Home
last modified time | relevance | path

Searched refs:bitmap (Results 1 – 25 of 214) sorted by relevance

123456789

/freebsd/sys/contrib/ck/include/
H A Dck_bitmap.h60 struct ck_bitmap bitmap; \
64 ck_bitmap_iterator_init((a), &(b)->bitmap)
67 ck_bitmap_init(&(a)->bitmap, (b), (c))
70 ck_bitmap_next(&(a)->bitmap, (b), (c))
73 ck_bitmap_set(&(a)->bitmap, (b))
76 ck_bitmap_bts(&(a)->bitmap, (b))
79 ck_bitmap_reset(&(a)->bitmap, (b))
82 ck_bitmap_test(&(a)->bitmap, (b))
85 ck_bitmap_union(&(a)->bitmap, &(b)->bitmap)
88 ck_bitmap_intersection(&(a)->bitmap, &(b)->bitmap)
[all …]
/freebsd/contrib/ofed/libmlx5/
H A Dbuf.c45 static int mlx5_bitmap_init(struct mlx5_bitmap *bitmap, uint32_t num, in mlx5_bitmap_init() argument
48 bitmap->last = 0; in mlx5_bitmap_init()
49 bitmap->top = 0; in mlx5_bitmap_init()
50 bitmap->max = num; in mlx5_bitmap_init()
51 bitmap->avail = num; in mlx5_bitmap_init()
52 bitmap->mask = mask; in mlx5_bitmap_init()
53 bitmap->avail = bitmap->max; in mlx5_bitmap_init()
54 bitmap->table = calloc(BITS_TO_LONGS(bitmap->max), sizeof(uint32_t)); in mlx5_bitmap_init()
55 if (!bitmap->table) in mlx5_bitmap_init()
61 static void bitmap_free_range(struct mlx5_bitmap *bitmap, uint32_t obj, in bitmap_free_range() argument
[all …]
/freebsd/sys/dev/mlx4/mlx4_core/
H A Dmlx4_alloc.c43 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap) in mlx4_bitmap_alloc() argument
47 spin_lock(&bitmap->lock); in mlx4_bitmap_alloc()
49 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in mlx4_bitmap_alloc()
50 if (obj >= bitmap->max) { in mlx4_bitmap_alloc()
51 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc()
52 & bitmap->mask; in mlx4_bitmap_alloc()
53 obj = find_first_zero_bit(bitmap->table, bitmap->max); in mlx4_bitmap_alloc()
56 if (obj < bitmap->max) { in mlx4_bitmap_alloc()
57 set_bit(obj, bitmap->table); in mlx4_bitmap_alloc()
58 bitmap->last = (obj + 1); in mlx4_bitmap_alloc()
[all …]
H A Dmlx4_qp.c530 struct mlx4_bitmap (*bitmap)[MLX4_QP_TABLE_ZONE_NUM] = NULL; in mlx4_create_zones() local
541 bitmap = kmalloc(sizeof(*bitmap), GFP_KERNEL); in mlx4_create_zones()
543 if (NULL == bitmap) { in mlx4_create_zones()
548 err = mlx4_bitmap_init(*bitmap + MLX4_QP_TABLE_ZONE_GENERAL, dev->caps.num_qps, in mlx4_create_zones()
557 err = mlx4_zone_add_one(qp_table->zones, *bitmap + MLX4_QP_TABLE_ZONE_GENERAL, in mlx4_create_zones()
565 err = mlx4_bitmap_init(*bitmap + MLX4_QP_TABLE_ZONE_RSS, in mlx4_create_zones()
576 err = mlx4_zone_add_one(qp_table->zones, *bitmap + MLX4_QP_TABLE_ZONE_RSS, 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()
668 err = mlx4_bitmap_init(*bitmap + k, roundup_pow_of_two(size), in mlx4_create_zones()
[all …]
/freebsd/sys/cddl/contrib/opensolaris/uts/common/sys/
H A Dbitmap.h84 #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
110 ((BT_WIM((bitmap), (bitindex)) & BT_BIW(bitindex)) ? 1 : 0)
111 #define BT_SET(bitmap, bitindex) \ argument
112 { BT_WIM((bitmap), (bitindex)) |= BT_BIW(bitindex); }
113 #define BT_CLEAR(bitmap, bitindex) \ argument
114 { BT_WIM((bitmap), (bitindex)) &= ~BT_BIW(bitindex); }
[all …]
/freebsd/sys/cddl/compat/opensolaris/sys/
H A Dbitmap.h71 #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
97 ((BT_WIM((bitmap), (bitindex)) & BT_BIW(bitindex)) ? 1 : 0)
98 #define BT_SET(bitmap, bitindex) \ argument
99 { BT_WIM((bitmap), (bitindex)) |= BT_BIW(bitindex); }
100 #define BT_CLEAR(bitmap, bitindex) \ argument
101 { BT_WIM((bitmap), (bitindex)) &= ~BT_BIW(bitindex); }
[all …]
/freebsd/sys/dev/ice/
H A Dice_bitops.h38 /* Define the size of the bitmap chunk */
48 /* Number of bits per bitmap chunk */
65 static inline bool ice_is_bit_set_internal(u16 nr, const ice_bitmap_t *bitmap) in ice_is_bit_set_internal() argument
67 return !!(*bitmap & BIT(nr)); in ice_is_bit_set_internal()
83 static inline void ice_clear_bit_internal(u16 nr, ice_bitmap_t *bitmap) in ice_clear_bit_internal() argument
85 *bitmap &= ~BIT(nr); in ice_clear_bit_internal()
88 static inline void ice_set_bit_internal(u16 nr, ice_bitmap_t *bitmap) in ice_set_bit_internal() argument
90 *bitmap |= BIT(nr); in ice_set_bit_internal()
94 ice_bitmap_t *bitmap) in ice_test_and_clear_bit_internal() argument
96 if (ice_is_bit_set_internal(nr, bitmap)) { in ice_test_and_clear_bit_internal()
103 ice_test_and_set_bit_internal(u16 nr,ice_bitmap_t * bitmap) ice_test_and_set_bit_internal() argument
120 ice_is_bit_set(const ice_bitmap_t * bitmap,u16 nr) ice_is_bit_set() argument
134 ice_clear_bit(u16 nr,ice_bitmap_t * bitmap) ice_clear_bit() argument
147 ice_set_bit(u16 nr,ice_bitmap_t * bitmap) ice_set_bit() argument
161 ice_test_and_clear_bit(u16 nr,ice_bitmap_t * bitmap) ice_test_and_clear_bit() argument
176 ice_test_and_set_bit(u16 nr,ice_bitmap_t * bitmap) ice_test_and_set_bit() argument
339 ice_find_next_bit(const ice_bitmap_t * bitmap,u16 size,u16 offset) ice_find_next_bit() argument
381 ice_find_first_bit(const ice_bitmap_t * bitmap,u16 size) ice_find_first_bit() argument
399 ice_is_any_bit_set(ice_bitmap_t * bitmap,u16 size) ice_is_any_bit_set() argument
[all...]
H A Dice_features.h51 * The driver stores a bitmap of the features that the device and OS are
52 * capable of, as well as another bitmap indicating which features are
82 * @bitmap: the feature bitmap
86 * during driver attach after setting up the feature bitmap.
88 * @remark the bitmap parameter is marked as unused in order to avoid an
92 ice_disable_unsupported_features(ice_bitmap_t __unused *bitmap) in ice_disable_unsupported_features()
94 ice_clear_bit(ICE_FEATURE_SRIOV, bitmap); in ice_disable_unsupported_features()
96 ice_clear_bit(ICE_FEATURE_NETMAP, bitmap); in ice_disable_unsupported_features()
90 ice_disable_unsupported_features(ice_bitmap_t __unused * bitmap) ice_disable_unsupported_features() argument
/freebsd/contrib/jemalloc/include/jemalloc/internal/
H A Dbit_util.h16 ffs_llu(unsigned long long bitmap) { in ffs_llu() argument
17 return JEMALLOC_INTERNAL_FFSLL(bitmap); in ffs_llu()
21 ffs_lu(unsigned long bitmap) { in ffs_lu() argument
22 return JEMALLOC_INTERNAL_FFSL(bitmap); in ffs_lu()
26 ffs_u(unsigned bitmap) { in ffs_u() argument
27 return JEMALLOC_INTERNAL_FFS(bitmap); in ffs_u()
32 popcount_lu(unsigned long bitmap) { in popcount_lu() argument
33 return JEMALLOC_INTERNAL_POPCOUNTL(bitmap); in popcount_lu()
43 cfs_lu(unsigned long* bitmap) { in cfs_lu() argument
44 size_t bit = ffs_lu(*bitmap) - 1; in cfs_lu()
[all …]
H A Dbitmap.h172 void bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo, bool fill);
176 bitmap_full(bitmap_t *bitmap, const bitmap_info_t *binfo) { in bitmap_full() argument
179 bitmap_t rg = bitmap[rgoff]; in bitmap_full()
186 if (bitmap[i] != 0) { in bitmap_full()
195 bitmap_get(bitmap_t *bitmap, const bitmap_info_t *binfo, size_t bit) { in bitmap_get() argument
201 g = bitmap[goff]; in bitmap_get()
206 bitmap_set(bitmap_t *bitmap, const bitmap_info_t *binfo, size_t bit) { in bitmap_set() argument
212 assert(!bitmap_get(bitmap, binfo, bit)); in bitmap_set()
214 gp = &bitmap[goff]; in bitmap_set()
219 assert(bitmap_get(bitmap, binfo, bit)); in bitmap_set()
[all …]
/freebsd/crypto/openssl/ssl/record/
H A Ddtls1_bitmap.c38 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()
59 void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap) in dtls1_record_bitmap_update() argument
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()
[all …]
/freebsd/crypto/openssh/
H A Dbitmap.h25 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 Dbitmap.c31 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()
126 bitmap_clear_bit(struct bitmap *b, u_int n) in bitmap_clear_bit()
[all …]
/freebsd/usr.sbin/pw/
H A Dbitmap.h34 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 Dbitmap.c34 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 Dbitmap.h65 #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 Dbitmap.c45 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 Ddn_sched_prio.c77 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 Dlinux_idr.c245 il->bitmap |= 1 << idx; in idr_remove_locked()
255 if (il == NULL || (il->bitmap & (1 << idx)) != 0) in idr_remove_locked()
260 il->bitmap |= 1 << idx; in idr_remove_locked()
307 if (il == NULL || (il->bitmap & (1 << idx))) { in idr_replace()
380 bitmap_fill(&iln->bitmap, IDR_SIZE); in idr_pre_get()
414 MPASS(il->bitmap != 0); in idr_get()
416 bitmap_fill(&il->bitmap, IDR_SIZE); in idr_get()
418 bitmap_fill(&il->bitmap, IDR_SIZE); in idr_get()
445 if (idr->top == NULL || idr->top->bitmap == 0) { in idr_get_new_locked()
455 il->bitmap &= ~1; in idr_get_new_locked()
[all …]
/freebsd/contrib/wpa/src/common/
H A Dhw_features_common.c384 static void punct_update_legacy_bw_80(u8 bitmap, u8 pri_chan, u8 *seg0) in punct_update_legacy_bw_80() argument
388 switch (bitmap) { in punct_update_legacy_bw_80()
410 if (bitmap & BIT((sec_chan - first_chan) / 4)) in punct_update_legacy_bw_80()
415 static void punct_update_legacy_bw_160(u8 bitmap, u8 pri, in punct_update_legacy_bw_160() argument
420 if (bitmap & 0x0F) { in punct_update_legacy_bw_160()
422 punct_update_legacy_bw_80(bitmap & 0xF, pri, seg0); in punct_update_legacy_bw_160()
426 if (bitmap & 0xF0) { in punct_update_legacy_bw_160()
428 punct_update_legacy_bw_80((bitmap & 0xF0) >> 4, pri, in punct_update_legacy_bw_160()
435 void punct_update_legacy_bw(u16 bitmap, u8 pri, enum oper_chan_width *width, in punct_update_legacy_bw() argument
438 if (*width == CONF_OPER_CHWIDTH_80MHZ && (bitmap & 0xF)) { in punct_update_legacy_bw()
[all …]
/freebsd/sys/dev/mlx5/mlx5_core/
H A Dmlx5_mpfs.c60 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 Dmlx5_uar.c207 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 Dp2p_hostapd.c96 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/contrib/file/magic/Magdir/
H A Djpeg108 # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-hsi1.trid.xml
109 # Note: called by TrID "HSI JPEG bitmap"
125 # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jpeg2k.trid.xml
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"
138 # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jpm.trid.xml
139 # Note: called by TrID "JPEG 2000 eXtended bitmap"
154 # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jpc.trid.xml
155 # Note: called by TrID "JPEG-2000 Code Stream bitmap"
[all …]
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dbitmap.h175 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()

123456789