Changeset 48197c1 in mainline for uspace/lib/c/include/bitops.h
- Timestamp:
- 2017-06-15T19:04:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce6e001
- Parents:
- 5cbccd4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/bitops.h
r5cbccd4 r48197c1 54 54 #define BIT_RANGE_EXTRACT(type, hi, lo, value) \ 55 55 (((value) >> (lo)) & BIT_RRANGE(type, (hi) - (lo) + 1)) 56 57 /** Insert @a value between bits @a hi .. @a lo. */ 58 #define BIT_RANGE_INSERT(type, hi, lo, value) \ 59 (((value) & BIT_RRANGE(type, (hi) - (lo) + 1)) << (lo)) 56 60 57 61 /** Return position of first non-zero bit from left (i.e. [log_2(arg)]).
Note:
See TracChangeset
for help on using the changeset viewer.