/*********************************************************
- * Copyright (C) 2004-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2017,2019 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
*/
#define PTRHASH_CONTAINER(ptr, type, member) \
- ((type *)((char *)(ptr) - vmw_offsetof(type, member)))
+ ((type *)((char *)(ptr) - offsetof(type, member)))
typedef int (*PtrHashForEachCallback)(PtrHashEntry *entry,
const void *clientData);
* Simple macros
*/
-
-/* Historical name. Deprecated. TODO: switch to offsetof */
-#ifndef vmw_offsetof
-#define vmw_offsetof(TYPE, MEMBER) offsetof(TYPE, MEMBER)
-#endif
-
#define VMW_CONTAINER_OF(ptr, type, member) \
- ((type *)((char *)(ptr) - vmw_offsetof(type, member)))
+ ((type *)((char *)(ptr) - offsetof(type, member)))
#ifndef ARRAYSIZE
#define ARRAYSIZE(a) (sizeof (a) / sizeof *(a))