예제 #1
0
void Clear_Bit(void *bitSet, uint_t bitPos) {
    ulong_t offset, bit;

    FIND_OFFSET_AND_BIT(bitPos, offset, bit);
    ((unsigned char *) bitSet)[offset] &= ~(1 << bit);
}
예제 #2
0
bool Is_Bit_Set(void *bitSet, uint_t bitPos) {
    ulong_t offset, bit;

    FIND_OFFSET_AND_BIT(bitPos, offset, bit);
    return (((unsigned char *) bitSet)[offset] & (1 << bit)) != 0;
}
예제 #3
0
void Set_Bit(void *bitSet, uint_t bitPos) {
    ulong_t offset, bit;

    FIND_OFFSET_AND_BIT(bitPos, offset, bit);
    ((uchar_t *) bitSet)[offset] |= (1 << bit);
}