Changeset 94795812 in mainline for kernel/generic/include/macros.h
- Timestamp:
- 2012-11-05T21:52:35Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d53cfc, 33c2952, efdfebc
- Parents:
- 0941e9ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/macros.h
r0941e9ae r94795812 130 130 | ((((uint64_t) (up)) & UINT32_C(0xffffffff)) << 32)) 131 131 132 /* Test for result wrap-around into positive numbers. */ 133 #define overflows_add(a, b) \ 134 (((a) + (b) < (a)) && ((a) + (b))) 132 /* Test for sum overflow. */ 133 #define overflows(a, b) \ 134 ((a) + (b) < (a)) 135 136 /* Test for sum overflow into positive numbers. */ 137 #define overflows_into_positive(a, b) \ 138 (overflows((a), (b)) && ((a) + (b) > 0)) 135 139 136 140 /** Pseudorandom generator
Note:
See TracChangeset
for help on using the changeset viewer.