Lines Matching refs:bitmap
2 * bitmap.c - Bitmap handling code. Originated from the Linux-NTFS project.
43 #include "bitmap.h"
50 * @bitmap: field of bits
54 * Set the bit @bit in the @bitmap to @new_value. Ignore all errors.
56 void ntfs_bit_set(u8 *bitmap, const u64 bit, const u8 new_value)
58 if (!bitmap || new_value > 1)
61 bitmap[bit >> 3] &= ~(1 << (bit & 7));
63 bitmap[bit >> 3] |= (1 << (bit & 7));
68 * @bitmap: field of bits
71 * Get and return the value of the bit @bit in @bitmap (0 or 1).
74 char ntfs_bit_get(const u8 *bitmap, const u64 bit)
76 if (!bitmap)
78 return (bitmap[bit >> 3] >> (bit & 7)) & 1;
83 * @bitmap: field of bits
90 char ntfs_bit_get_and_set(u8 *bitmap, const u64 bit, const u8 new_value)
94 if (!bitmap || new_value > 1)
97 old_bit = (bitmap[bit >> 3] >> shift) & 1;
99 bitmap[bit >> 3] ^= 1 << shift;
104 * ntfs_bitmap_set_bits_in_run - set a run of bits in a bitmap to a value
105 * @na: attribute containing the bitmap
110 * Set @count bits starting at bit @start_bit in the bitmap described by the
182 /* and it is in the currently loaded bitmap window... */
219 ntfs_log_perror("Failed to write buffer to bitmap "
258 * ntfs_bitmap_set_run - set a run of bits in a bitmap
259 * @na: attribute containing the bitmap
263 * Set @count bits starting at bit @start_bit in the bitmap described by the
280 * ntfs_bitmap_clear_run - clear a run of bits in a bitmap
281 * @na: attribute containing the bitmap
285 * Clear @count bits starting at bit @start_bit in the bitmap described by the