BITDEL64(9F) | Kernel Functions for Drivers | BITDEL64(9F) |
bitdel64
— delete
bits from an integer
#include
<sys/bitext.h>
uint64_t
bitdel64
(uint64_t value,
uint_t high, uint_t low);
Volatile - This interface is still evolving in illumos. API and ABI stability is not guaranteed.
The
bitdel64
()
function removes bits from an integer, value. The act
of removing a bit range not only removes all the bits in the range specified
by low and high, but also causes
all remaining bits to be shifted over to start at
low.
For example, consider the binary value 0b11_1101_0011 (0x3d3). If we deleted bits 4 through 7, the resulting value would be 0b11_0011 (0x33).
high and low are an inclusive range ([low, high]) and the value of low cannot be greater than high or 63.
Upon successful completion, the bitdel64
()
returns the modified integer with the appropriate bits removed.
April 12, 2022 | OmniOS |