ck_cc: Add CK_CC_BARRIER for compiler barrier.

ck_pring
Samy Al Bahra 12 years ago
parent f567513f8c
commit bc19dccb1f

@ -45,6 +45,10 @@
#define CK_CC_PAD(x) union { char pad[x]; } #define CK_CC_PAD(x) union { char pad[x]; }
#ifndef CK_CC_BARRIER
#define CK_CC_BARRIER()
#endif
#ifndef CK_CC_ALIASED #ifndef CK_CC_ALIASED
#define CK_CC_ALIASED #define CK_CC_ALIASED
#endif #endif

@ -68,6 +68,11 @@
*/ */
#define CK_CC_CACHELINE CK_CC_ALIGN(CK_MD_CACHELINE) #define CK_CC_CACHELINE CK_CC_ALIGN(CK_MD_CACHELINE)
/*
* Compiler barrier.
*/
#define CK_CC_BARRIER() __asm__ __volatile__("" ::: "memory")
/* /*
* These are functions which should be avoided. * These are functions which should be avoided.
*/ */

Loading…
Cancel
Save