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

Comparing libecb/ecb.h (file contents):
Revision 1.18 by root, Thu May 26 18:36:43 2011 UTC vs.
Revision 1.19 by root, Thu May 26 18:43:48 2011 UTC

96/* booleans, not the expression. */ 96/* booleans, not the expression. */
97#define ecb_unlikely(expr) ecb_expect (!!(expr), 0) 97#define ecb_unlikely(expr) ecb_expect (!!(expr), 0)
98#define ecb_likely(expr) ecb_expect (!!(expr), 1) 98#define ecb_likely(expr) ecb_expect (!!(expr), 1)
99 99
100/* try to tell the compiler that some condition is definitely true */ 100/* try to tell the compiler that some condition is definitely true */
101#define ecb_assume(cond) do { if (!(cond)) unreachable (); } while (0) 101#define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0)
102 102
103/* count trailing zero bits and count # of one bits */ 103/* count trailing zero bits and count # of one bits */
104#if ECB_GCC_VERSION(3,4) 104#if ECB_GCC_VERSION(3,4)
105#define ecb_ctz32 (x) __builtin_ctz (x) 105#define ecb_ctz32 (x) __builtin_ctz (x)
106#define ecb_popcount32 (x) __builtin_popcount (x) 106#define ecb_popcount32 (x) __builtin_popcount (x)
107#else 107#else
108ECB_HEADER_INLINE int ecb_ctz32 (uint32_t x) ecb_const; 108ECB_HEADER_INLINE int ecb_ctz32 (uint32_t x) ecb_const;
109ECB_HEADER_INLINE 109ECB_HEADER_INLINE
110ecb_ctz32 (uint32_t x) 110ecb_ctz32 (uint32_t x)
111{ 111{
112 int r = 0; 112 int r = 0;
113 113

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines