Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/include/atomic.h
Show First 20 Lines • Show All 846 Lines • ▼ Show 20 Lines | |||||
#define atomic_fetchadd_32 atomic_fetchadd_int | #define atomic_fetchadd_32 atomic_fetchadd_int | ||||
#define atomic_swap_int atomic_swap_32 | #define atomic_swap_int atomic_swap_32 | ||||
#ifdef __powerpc64__ | #ifdef __powerpc64__ | ||||
#define atomic_fetchadd_64 atomic_fetchadd_long | #define atomic_fetchadd_64 atomic_fetchadd_long | ||||
#define atomic_swap_long atomic_swap_64 | #define atomic_swap_long atomic_swap_64 | ||||
#define atomic_swap_ptr atomic_swap_64 | #define atomic_swap_ptr atomic_swap_64 | ||||
#else | |||||
#define atomic_swap_long atomic_swap_32 | |||||
kib: I suspect this might not compile. | |||||
Done Inline ActionsOther places I see the same #define . I'm currently doing a universe, so I will know. hselasky: Other places I see the same #define . I'm currently doing a universe, so I will know. | |||||
Not Done Inline ActionsIt would work if the real implementation function does explicit cast to uint32_t or uint32_t is typedef for long. If it is typedef to int, then this should break. kib: It would work if the real implementation function does explicit cast to uint32_t or uint32_t is… | |||||
Not Done Inline ActionsBut you still use u_int there ? kib: But you still use u_int there ? | |||||
#define atomic_swap_ptr atomic_swap_32 | |||||
#endif | #endif | ||||
#undef __ATOMIC_REL | #undef __ATOMIC_REL | ||||
#undef __ATOMIC_ACQ | #undef __ATOMIC_ACQ | ||||
static __inline void | static __inline void | ||||
atomic_thread_fence_acq(void) | atomic_thread_fence_acq(void) | ||||
{ | { | ||||
Show All 26 Lines |
I suspect this might not compile.