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.
value
high The high end, inclusive, of the bit range to delete from
value.
low The low end, inclusive, of the bit range to delete from
value.
value An integer to remove bits from.
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.
bitset64(9F), bitx64(9F)
illumos April 12, 2022 illumos
NAME
bitdel64 - delete bits from an integer
SYNOPSIS
#include <sys/bitext.h>
uint64_t
bitdel64(uint64_t value, uint_t high, uint_t low);
INTERFACE LEVEL
Volatile - This interface is still evolving in illumos. API and ABI
stability is not guaranteed.
PARAMETERS
value
high The high end, inclusive, of the bit range to delete from
value.
low The low end, inclusive, of the bit range to delete from
value.
value An integer to remove bits from.
DESCRIPTION
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.
RETURN VALUES
Upon successful completion, the bitdel64() returns the modified integer
with the appropriate bits removed.
SEE ALSO
bitset64(9F), bitx64(9F)
illumos April 12, 2022 illumos