… | |
… | |
94 | #define ecb_pure ecb_attribute ((__pure__)) |
94 | #define ecb_pure ecb_attribute ((__pure__)) |
95 | #define ecb_hot ecb_attribute ((__hot__)) /* 4.3 */ |
95 | #define ecb_hot ecb_attribute ((__hot__)) /* 4.3 */ |
96 | #define ecb_cold ecb_attribute ((__cold__)) /* 4.3 */ |
96 | #define ecb_cold ecb_attribute ((__cold__)) /* 4.3 */ |
97 | |
97 | |
98 | /* put into if's if you are very sure that the expression */ |
98 | /* put into if's if you are very sure that the expression */ |
99 | /* is mostly true or mosty false. note that these return */ |
99 | /* is mostly true or mostly false. note that these return */ |
100 | /* booleans, not the expression. */ |
100 | /* booleans, not the expression. */ |
101 | #define ecb_unlikely(expr) ecb_expect (!!(expr), 0) |
101 | #define ecb_expect_false(expr) ecb_expect (!!(expr), 0) |
|
|
102 | #define ecb_expect_true(expr) ecb_expect (!!(expr), 1) |
102 | #define ecb_likely(expr) ecb_expect (!!(expr), 1) |
103 | #define ecb_likely(expr) ecb_expect_true (expr) |
|
|
104 | #define ecb_unlikely(expr) ecb_expect_false (expr) |
103 | |
105 | |
104 | /* try to tell the compiler that some condition is definitely true */ |
106 | /* try to tell the compiler that some condition is definitely true */ |
105 | #define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0) |
107 | #define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0) |
106 | |
108 | |
107 | /* count trailing zero bits and count # of one bits */ |
109 | /* count trailing zero bits and count # of one bits */ |