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

Comparing libecb/ecb.h (file contents):
Revision 1.24 by root, Thu May 26 19:49:21 2011 UTC vs.
Revision 1.27 by sf-exg, Thu May 26 21:36:49 2011 UTC

81# define ecb_decltype(x) __decltype(x) 81# define ecb_decltype(x) __decltype(x)
82#elif ECB_GCC_VERSION(3,0) 82#elif ECB_GCC_VERSION(3,0)
83# define ecb_decltype(x) typeof(x) 83# define ecb_decltype(x) typeof(x)
84#endif 84#endif
85 85
86#define ecb_artificial ecb_attribute ((__artificial__)) 86#define ecb_artificial ecb_attribute ((__artificial__)) /* 4.3 */
87#define ecb_noinline ecb_attribute ((__noinline__)) 87#define ecb_noinline ecb_attribute ((__noinline__))
88#define ecb_noreturn ecb_attribute ((__noreturn__)) 88#define ecb_noreturn ecb_attribute ((__noreturn__))
89#define ecb_unused ecb_attribute ((__unused__)) 89#define ecb_unused ecb_attribute ((__unused__))
90#define ecb_const ecb_attribute ((__const__)) 90#define ecb_const ecb_attribute ((__const__))
91#define ecb_pure ecb_attribute ((__pure__)) 91#define ecb_pure ecb_attribute ((__pure__))
101/* try to tell the compiler that some condition is definitely true */ 101/* try to tell the compiler that some condition is definitely true */
102#define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0) 102#define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0)
103 103
104/* count trailing zero bits and count # of one bits */ 104/* count trailing zero bits and count # of one bits */
105#if ECB_GCC_VERSION(3,4) 105#if ECB_GCC_VERSION(3,4)
106#define ecb_ctz32 (x) __builtin_ctz (x) 106#define ecb_ctz32(x) __builtin_ctz (x)
107#define ecb_popcount32 (x) __builtin_popcount (x) 107#define ecb_popcount32(x) __builtin_popcount (x)
108#else 108#else
109ECB_HEADER_INLINE int ecb_ctz32 (uint32_t x) ecb_const; 109ECB_HEADER_INLINE int ecb_ctz32 (uint32_t x) ecb_const;
110ECB_HEADER_INLINE 110ECB_HEADER_INLINE
111ecb_ctz32 (uint32_t x) 111ecb_ctz32 (uint32_t x)
112{ 112{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines