/freebsd/sys/contrib/ck/include/ |
H A D | ck_bitmap.h | 85 ck_bitmap_union(&(a)->bitmap, &(b)->bitmap) 88 ck_bitmap_intersection(&(a)->bitmap, &(b)->bitmap) 91 ck_bitmap_intersection_negate(&(a)->bitmap, &(b)->bitmap) 109 ck_bitmap_bits(&(a)->bitmap) 115 (&(a)->bitmap) 155 return bitmap->n_bits; in ck_bitmap_bits() 166 return bitmap->map; in ck_bitmap_buffer() 320 limit = bitmap->n_bits; in ck_bitmap_empty() 351 limit = bitmap->n_bits; in ck_bitmap_full() 382 limit = bitmap->n_bits; in ck_bitmap_count() [all …]
|
/freebsd/contrib/ofed/libmlx5/ |
H A D | buf.c | 48 bitmap->last = 0; in mlx5_bitmap_init() 53 bitmap->avail = bitmap->max; in mlx5_bitmap_init() 70 bitmap->last = min(bitmap->last, obj); in bitmap_free_range() 71 bitmap->top = (bitmap->top + bitmap->max) & bitmap->mask; in bitmap_free_range() 77 return (bitmap->avail == bitmap->max) ? 1 : 0; in bitmap_empty() 105 obj = mlx5_find_first_zero_bit(bitmap->table, bitmap->max); in mlx5_bitmap_alloc() 109 if (bitmap->last == bitmap->max) in mlx5_bitmap_alloc() 163 obj = find_aligned_range(bitmap->table, bitmap->last, in bitmap_alloc_range() 166 bitmap->top = (bitmap->top + bitmap->max) & bitmap->mask; in bitmap_alloc_range() 167 obj = find_aligned_range(bitmap->table, 0, bitmap->max, in bitmap_alloc_range() [all …]
|
/freebsd/sys/cddl/contrib/opensolaris/uts/common/sys/ |
H A D | bitmap.h | 84 #define BT_WIM(bitmap, bitindex) \ argument 85 ((bitmap)[(bitindex) >> BT_ULSHIFT]) 93 #define BT_WIM32(bitmap, bitindex) \ argument 94 ((bitmap)[(bitindex) >> BT_ULSHIFT32]) 109 #define BT_TEST(bitmap, bitindex) \ argument 111 #define BT_SET(bitmap, bitindex) \ argument 113 #define BT_CLEAR(bitmap, bitindex) \ argument 121 #define BT_TEST32(bitmap, bitindex) \ argument 123 #define BT_SET32(bitmap, bitindex) \ argument 125 #define BT_CLEAR32(bitmap, bitindex) \ argument [all …]
|
/freebsd/sys/dev/mlx4/mlx4_core/ |
H A D | mlx4_alloc.c | 49 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in mlx4_bitmap_alloc() 51 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc() 59 if (bitmap->last == bitmap->max) in mlx4_bitmap_alloc() 121 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc_range() 131 if (bitmap->last >= bitmap->max) in mlx4_bitmap_alloc_range() 159 obj &= bitmap->max + bitmap->reserved_top - 1; in mlx4_bitmap_free_range() 163 bitmap->last = min(bitmap->last, obj); in mlx4_bitmap_free_range() 164 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_free_range() 185 bitmap->effective_len = bitmap->avail; in mlx4_bitmap_init() 256 zone->bitmap = bitmap; in mlx4_zone_add_one() [all …]
|
H A D | mlx4_qp.c | 541 bitmap = kmalloc(sizeof(*bitmap), GFP_KERNEL); in mlx4_create_zones() 543 if (NULL == bitmap) { in mlx4_create_zones() 594 for (k = MLX4_QP_TABLE_ZONE_RSS + 1; k < sizeof(*bitmap)/sizeof((*bitmap)[0]); in mlx4_create_zones() 657 *bitmap + MLX4_QP_TABLE_ZONE_RSS, in mlx4_create_zones() 675 err = mlx4_bitmap_init(*bitmap + k, 1, in mlx4_create_zones() 699 qp_table->bitmap_gen = *bitmap; in mlx4_create_zones() 705 mlx4_bitmap_cleanup(*bitmap + k); in mlx4_create_zones() 706 kfree(bitmap); in mlx4_create_zones() 722 struct mlx4_bitmap *bitmap = in mlx4_cleanup_qp_zones() local 727 if (NULL == bitmap) in mlx4_cleanup_qp_zones() [all …]
|
/freebsd/sys/cddl/compat/opensolaris/sys/ |
H A D | bitmap.h | 71 #define BT_WIM(bitmap, bitindex) \ argument 72 ((bitmap)[(bitindex) >> BT_ULSHIFT]) 80 #define BT_WIM32(bitmap, bitindex) \ argument 81 ((bitmap)[(bitindex) >> BT_ULSHIFT32]) 96 #define BT_TEST(bitmap, bitindex) \ argument 98 #define BT_SET(bitmap, bitindex) \ argument 99 { BT_WIM((bitmap), (bitindex)) |= BT_BIW(bitindex); } 100 #define BT_CLEAR(bitmap, bitindex) \ argument 108 #define BT_TEST32(bitmap, bitindex) \ argument 110 #define BT_SET32(bitmap, bitindex) \ argument [all …]
|
/freebsd/sys/dev/ice/ |
H A D | ice_bitops.h | 67 return !!(*bitmap & BIT(nr)); in ice_is_bit_set_internal() 85 *bitmap &= ~BIT(nr); in ice_clear_bit_internal() 90 *bitmap |= BIT(nr); in ice_set_bit_internal() 94 ice_bitmap_t *bitmap) in ice_test_and_clear_bit_internal() argument 97 ice_clear_bit_internal(nr, bitmap); in ice_test_and_clear_bit_internal() 108 ice_set_bit_internal(nr, bitmap); in ice_test_and_set_bit_internal() 123 &bitmap[BIT_CHUNK(nr)]); in ice_is_bit_set() 164 &bitmap[BIT_CHUNK(nr)]); in ice_test_and_clear_bit() 179 &bitmap[BIT_CHUNK(nr)]); in ice_test_and_set_bit() 350 if (bitmap[i] != 0) { in ice_find_next_bit() [all …]
|
/freebsd/crypto/openssl/ssl/record/ |
H A D | dtls1_bitmap.c | 38 int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap) in dtls1_record_replay_check() argument 44 cmp = satsub64be(seq, bitmap->max_seq_num); in dtls1_record_replay_check() 50 if (shift >= sizeof(bitmap->map) * 8) in dtls1_record_replay_check() 52 else if (bitmap->map & (1UL << shift)) in dtls1_record_replay_check() 65 cmp = satsub64be(seq, bitmap->max_seq_num); in dtls1_record_bitmap_update() 68 if (shift < sizeof(bitmap->map) * 8) in dtls1_record_bitmap_update() 69 bitmap->map <<= shift, bitmap->map |= 1UL; in dtls1_record_bitmap_update() 71 bitmap->map = 1UL; in dtls1_record_bitmap_update() 72 memcpy(bitmap->max_seq_num, seq, SEQ_NUM_SIZE); in dtls1_record_bitmap_update() 75 if (shift < sizeof(bitmap->map) * 8) in dtls1_record_bitmap_update() [all …]
|
/freebsd/crypto/openssh/ |
H A D | bitmap.h | 25 struct bitmap; 28 struct bitmap *bitmap_new(void); 31 void bitmap_free(struct bitmap *b); 34 void bitmap_zero(struct bitmap *b); 37 int bitmap_test_bit(struct bitmap *b, u_int n); 40 int bitmap_set_bit(struct bitmap *b, u_int n); 43 void bitmap_clear_bit(struct bitmap *b, u_int n); 46 size_t bitmap_nbits(struct bitmap *b); 49 size_t bitmap_nbytes(struct bitmap *b); 52 int bitmap_to_string(struct bitmap *b, void *p, size_t l); [all …]
|
H A D | bitmap.c | 31 struct bitmap { struct 37 struct bitmap * argument 40 struct bitmap *ret; in bitmap_new() 54 bitmap_free(struct bitmap *b) in bitmap_free() 65 bitmap_zero(struct bitmap *b) in bitmap_zero() 72 bitmap_test_bit(struct bitmap *b, u_int n) in bitmap_test_bit() 82 reserve(struct bitmap *b, u_int n) in reserve() 101 bitmap_set_bit(struct bitmap *b, u_int n) in bitmap_set_bit() 117 retop(struct bitmap *b) in retop() 141 bitmap_nbits(struct bitmap *b) in bitmap_nbits() [all …]
|
H A D | krl.c | 553 put_bitmap(struct sshbuf *buf, struct bitmap *bitmap) in put_bitmap() argument 581 struct bitmap *bitmap = NULL; in revoked_certs_generate() local 630 bitmap = NULL; in revoked_certs_generate() 701 bitmap_free(bitmap); in revoked_certs_generate() 702 bitmap = NULL; in revoked_certs_generate() 725 bitmap_free(bitmap); in revoked_certs_generate() 873 struct bitmap *bitmap = NULL; in parse_revoked_certs() local 940 bitmap_free(bitmap); in parse_revoked_certs() 941 bitmap = NULL; in parse_revoked_certs() 973 if (bitmap != NULL) in parse_revoked_certs() [all …]
|
/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | bit_util.h | 26 ffs_u(unsigned bitmap) { in ffs_u() argument 45 *bitmap ^= ZU(1) << bit; in cfs_lu() 50 ffs_zu(size_t bitmap) { in ffs_zu() argument 52 return ffs_u(bitmap); in ffs_zu() 54 return ffs_lu(bitmap); in ffs_zu() 56 return ffs_llu(bitmap); in ffs_zu() 63 ffs_u64(uint64_t bitmap) { in ffs_u64() argument 65 return ffs_lu(bitmap); in ffs_u64() 67 return ffs_llu(bitmap); in ffs_u64() 76 return ffs_u(bitmap); in ffs_u32() [all …]
|
H A D | bitmap.h | 179 bitmap_t rg = bitmap[rgoff]; in bitmap_full() 186 if (bitmap[i] != 0) { in bitmap_full() 201 g = bitmap[goff]; in bitmap_get() 214 gp = &bitmap[goff]; in bitmap_set() 219 assert(bitmap_get(bitmap, binfo, bit)); in bitmap_set() 293 g = bitmap[i]; in bitmap_ffu() 306 assert(!bitmap_full(bitmap, binfo)); in bitmap_sfu() 319 g = bitmap[0]; in bitmap_sfu() 322 g = bitmap[i]; in bitmap_sfu() 326 bitmap_set(bitmap, binfo, bit); in bitmap_sfu() [all …]
|
/freebsd/usr.sbin/pw/ |
H A D | bitmap.h | 34 struct bitmap struct 41 struct bitmap bm_alloc(int size); argument 42 void bm_dealloc(struct bitmap * bm); 43 void bm_setbit(struct bitmap * bm, int pos); 44 void bm_clrbit(struct bitmap * bm, int pos); 45 int bm_isset(struct bitmap * bm, int pos); 46 int bm_firstunset(struct bitmap * bm); 47 int bm_lastset(struct bitmap * bm);
|
H A D | bitmap.c | 34 struct bitmap 37 struct bitmap bm; in bm_alloc() 48 bm_dealloc(struct bitmap * bm) in bm_dealloc() 61 bm_setbit(struct bitmap * bm, int pos) in bm_setbit() 70 bm_clrbit(struct bitmap * bm, int pos) in bm_clrbit() 79 bm_isset(struct bitmap * bm, int pos) in bm_isset() 88 bm_firstunset(struct bitmap * bm) in bm_firstunset() 109 bm_lastset(struct bitmap * bm) in bm_lastset()
|
/freebsd/sys/contrib/openzfs/include/sys/ |
H A D | bitmap.h | 65 #define BT_WIM(bitmap, bitindex) \ argument 66 ((bitmap)[(bitindex) >> BT_ULSHIFT]) 82 #define BT_TEST(bitmap, bitindex) \ argument 83 ((BT_WIM((bitmap), (bitindex)) & BT_BIW(bitindex)) ? 1 : 0) 84 #define BT_SET(bitmap, bitindex) \ argument 85 { BT_WIM((bitmap), (bitindex)) |= BT_BIW(bitindex); } 86 #define BT_CLEAR(bitmap, bitindex) \ argument 87 { BT_WIM((bitmap), (bitindex)) &= ~BT_BIW(bitindex); }
|
/freebsd/contrib/jemalloc/src/ |
H A D | bitmap.c | 45 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo, bool fill) { in bitmap_init() argument 56 memset(bitmap, 0, bitmap_size(binfo)); in bitmap_init() 66 memset(bitmap, 0xffU, bitmap_size(binfo)); in bitmap_init() 70 bitmap[binfo->levels[1].group_offset - 1] >>= extra; in bitmap_init() 78 bitmap[binfo->levels[i+1].group_offset - 1] >>= extra; in bitmap_init() 100 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo, bool fill) { in bitmap_init() argument 104 memset(bitmap, 0, bitmap_size(binfo)); in bitmap_init() 108 memset(bitmap, 0xffU, bitmap_size(binfo)); in bitmap_init() 112 bitmap[binfo->ngroups - 1] >>= extra; in bitmap_init()
|
/freebsd/sys/netpfil/ipfw/ |
H A D | dn_sched_prio.c | 77 BITMAP_T bitmap; /* array bitmap */ member 91 if (test_bit(prio, &si->bitmap) == 0) { in prio_enqueue() 93 __set_bit(prio, &si->bitmap); in prio_enqueue() 122 if (si->bitmap == 0) /* scheduler idle */ in prio_dequeue() 125 prio = ffs(si->bitmap) - 1; in prio_dequeue() 137 __clear_bit(prio, &si->bitmap); in prio_dequeue() 148 si->bitmap = 0; in prio_new_sched() 176 if (test_bit(prio, &si->bitmap) == 0) { in prio_new_queue() 178 __set_bit(prio, &si->bitmap); in prio_new_queue() 204 __clear_bit(prio, &si->bitmap); in prio_free_queue()
|
/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_idr.c | 237 il->bitmap |= 1 << idx; in idr_remove_locked() 252 il->bitmap |= 1 << idx; in idr_remove_locked() 372 bitmap_fill(&iln->bitmap, IDR_SIZE); in idr_pre_get() 406 MPASS(il->bitmap != 0); in idr_get() 408 bitmap_fill(&il->bitmap, IDR_SIZE); in idr_get() 410 bitmap_fill(&il->bitmap, IDR_SIZE); in idr_get() 447 il->bitmap &= ~1; in idr_get_new_locked() 458 idx = ffsl(il->bitmap); in idr_get_new_locked() 476 il->bitmap &= ~(1 << idx); in idr_get_new_locked() 550 il->bitmap &= ~1; in idr_get_new_above_locked() [all …]
|
/freebsd/sys/dev/mlx5/mlx5_core/ |
H A D | mlx5_mpfs.c | 60 index = find_first_zero_bit(dev->mpfs.bitmap, l2table_size); in mlx5_mpfs_add_mac() 62 set_bit(index, dev->mpfs.bitmap); in mlx5_mpfs_add_mac() 79 clear_bit(index, dev->mpfs.bitmap); in mlx5_mpfs_add_mac() 106 clear_bit(index, dev->mpfs.bitmap); in mlx5_mpfs_del_mac() 117 bitmap_zero(dev->mpfs.bitmap, MLX5_MPFS_TABLE_MAX); in mlx5_mpfs_init() 126 num = bitmap_weight(dev->mpfs.bitmap, MLX5_MPFS_TABLE_MAX); in mlx5_mpfs_destroy()
|
H A D | mlx5_uar.c | 207 unsigned long *bitmap; in alloc_bfreg() local 233 bitmap = up->fp_bitmap; in alloc_bfreg() 236 bitmap = up->reg_bitmap; in alloc_bfreg() 239 dbi = find_first_bit(bitmap, up->bfregs); in alloc_bfreg() 240 clear_bit(dbi, bitmap); in alloc_bfreg() 294 unsigned long *bitmap; in mlx5_free_bfreg() local 310 bitmap = up->fp_bitmap; in mlx5_free_bfreg() 313 bitmap = up->reg_bitmap; in mlx5_free_bfreg() 317 set_bit(dbi, bitmap); in mlx5_free_bfreg()
|
/freebsd/contrib/wpa/src/ap/ |
H A D | p2p_hostapd.c | 96 u8 bitmap; in hostapd_eid_p2p_manage() local 105 bitmap = P2P_MAN_DEVICE_MANAGEMENT; in hostapd_eid_p2p_manage() 107 bitmap |= P2P_MAN_CROSS_CONNECTION_PERMITTED; in hostapd_eid_p2p_manage() 108 bitmap |= P2P_MAN_COEXISTENCE_OPTIONAL; in hostapd_eid_p2p_manage() 109 *eid++ = bitmap; in hostapd_eid_p2p_manage()
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | bitmap.h | 175 bitmap_find_free_region(unsigned long *bitmap, int bits, int order) in bitmap_find_free_region() argument 181 if (!linux_reg_op(bitmap, pos, order, REG_OP_ISFREE)) in bitmap_find_free_region() 183 linux_reg_op(bitmap, pos, order, REG_OP_ALLOC); in bitmap_find_free_region() 190 bitmap_allocate_region(unsigned long *bitmap, int pos, int order) in bitmap_allocate_region() argument 192 if (!linux_reg_op(bitmap, pos, order, REG_OP_ISFREE)) in bitmap_allocate_region() 194 linux_reg_op(bitmap, pos, order, REG_OP_ALLOC); in bitmap_allocate_region() 199 bitmap_release_region(unsigned long *bitmap, int pos, int order) in bitmap_release_region() argument 201 linux_reg_op(bitmap, pos, order, REG_OP_RELEASE); in bitmap_release_region() 445 bitmap_free(const unsigned long *bitmap) in bitmap_free() argument 447 kfree(bitmap); in bitmap_free()
|
/freebsd/contrib/file/magic/Magdir/ |
H A D | jpeg | 108 # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-hsi1.trid.xml 109 # Note: called by TrID "HSI JPEG bitmap" 126 # Note: called by TrID "JPEG 2000 bitmap" 132 # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jpx.trid.xml 133 # Note: called by TrID "JPEG 2000 eXtended bitmap" 139 # Note: called by TrID "JPEG 2000 eXtended bitmap" 155 # Note: called by TrID "JPEG-2000 Code Stream bitmap" 170 # http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-wmp.trid.xml 171 # Note: called by TrID "JPEG XR bitmap" 240 # Note: called by TrID "JPEG XL bitmap" [all …]
|
/freebsd/sys/amd64/vmm/intel/ |
H A D | vmx_msr.c | 136 msr_bitmap_initialize(char *bitmap) in msr_bitmap_initialize() argument 139 memset(bitmap, 0xff, PAGE_SIZE); in msr_bitmap_initialize() 143 msr_bitmap_change_access(char *bitmap, u_int msr, int access) in msr_bitmap_change_access() argument 157 bitmap[byte] &= ~(1 << bit); in msr_bitmap_change_access() 159 bitmap[byte] |= 1 << bit; in msr_bitmap_change_access() 163 bitmap[byte] &= ~(1 << bit); in msr_bitmap_change_access() 165 bitmap[byte] |= 1 << bit; in msr_bitmap_change_access()
|