Lines Matching defs:bit

599  * netlbl_catmap_walk - Walk a LSM secattr catmap looking for a bit
605 * returns the spot of the first set bit or -ENOENT if no bits are set.
612 u32 bit;
621 bit = offset % NETLBL_CATMAP_MAPSIZE;
624 bit = 0;
626 bitmap = iter->bitmap[idx] >> bit;
632 bit++;
635 (NETLBL_CATMAP_MAPSIZE * idx) + bit;
645 bit = 0;
659 * returns the spot of the first cleared bit or -ENOENT if the offset is past
668 u32 bit;
678 bit = offset % NETLBL_CATMAP_MAPSIZE;
681 bit = 0;
683 bitmask = NETLBL_CATMAP_BIT << bit;
689 bit++;
692 if (prev && idx == 0 && bit == 0)
696 (NETLBL_CATMAP_MAPSIZE * idx) + bit - 1;
705 bit = 0;
765 * netlbl_catmap_setbit - Set a bit in a LSM secattr catmap
767 * @bit: the bit to set
771 * Set the bit specified by @bit in @catmap. Returns zero on success,
776 u32 bit,
782 iter = _netlbl_catmap_getnode(catmap, bit, _CM_F_ALLOC, flags);
786 bit -= iter->startbit;
787 idx = bit / NETLBL_CATMAP_MAPSIZE;
788 iter->bitmap[idx] |= NETLBL_CATMAP_BIT << (bit % NETLBL_CATMAP_MAPSIZE);
797 * @start: the starting bit
798 * @end: the last bit in the string
870 * netlbl_bitmap_walk - Walk a bitmap looking for a bit
874 * @state: if non-zero, look for a set (1) bit else look for a cleared (0) bit
878 * desired bit is found or we reach the end. Return the bit offset, -1 if
915 * netlbl_bitmap_setbit - Sets a single bit in a bitmap
917 * @bit: the bit
918 * @state: if non-zero, set the bit (1) else clear the bit (0)
921 * Set a single bit in the bitmask. Returns zero on success, negative values
924 void netlbl_bitmap_setbit(unsigned char *bitmap, u32 bit, u8 state)
930 byte_spot = bit / 8;
931 bitmask = 0x80 >> (bit % 8);