ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.h
(Generate patch)

Comparing libecb/ecb.h (file contents):
Revision 1.57 by root, Wed Aug 3 15:15:00 2011 UTC vs.
Revision 1.58 by root, Wed Aug 3 15:40:18 2011 UTC

62 #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) 62 #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
63 #endif 63 #endif
64#endif 64#endif
65 65
66/*****************************************************************************/ 66/*****************************************************************************/
67
68/* ECB_NO_THREADS - ecb is not used by multiple threads, ever */
69/* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */
70
71#if ECB_NO_THREADS || ECB_NO_SMP
72 #define ECB_MEMORY_FENCE do { } while (0)
73 #define ECB_MEMORY_FENCE_ACQUIRE do { } while (0)
74 #define ECB_MEMORY_FENCE_RELEASE do { } while (0)
75#endif
67 76
68#ifndef ECB_MEMORY_FENCE 77#ifndef ECB_MEMORY_FENCE
69 #if ECB_GCC_VERSION(2,5) 78 #if ECB_GCC_VERSION(2,5)
70 #if __x86 79 #if __x86
71 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory") 80 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines