X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fapi_x86.h;h=9ca5500758b3778dbfea79b7aa31f7c8e1785b13;hb=674f7a6983f888438c36f8fba179db1a5349d3e9;hp=f48fce939453b5922113a74f34d0959709bf1af5;hpb=833dbdb633ba44bfb71b4b965a83096d8e4e827b;p=urcu.git diff --git a/tests/api_x86.h b/tests/api_x86.h index f48fce9..9ca5500 100644 --- a/tests/api_x86.h +++ b/tests/api_x86.h @@ -77,6 +77,8 @@ #define LOCK_PREFIX "lock ; " +#if 0 /* duplicate with arch_atomic.h */ + /* * Atomic data structure, initialization, and access. */ @@ -310,6 +312,8 @@ __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" \ #define smp_mb__before_atomic_inc() barrier() #define smp_mb__after_atomic_inc() barrier() +#endif //0 + /* * api_pthreads.h: API mapping to pthreads environment. * @@ -346,7 +350,6 @@ __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" \ /* * Compiler magic. */ -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) @@ -693,7 +696,6 @@ static void smp_init(void) #define LIST_POISON1 ((void *) 0x00100100) #define LIST_POISON2 ((void *) 0x00200200) -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );})