Home
last modified time | relevance | path

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

12

/xnu-11215/bsd/netinet/
H A Din_stat.c43 uint64_t *bitmap; in in_stat_set_activity_bitmap() local
53 bitmap = &activity->bitmap[0]; in in_stat_set_activity_bitmap()
55 bitmap = &activity->bitmap[1]; in in_stat_set_activity_bitmap()
62 activity->bitmap[0] = activity->bitmap[1] = 0; in in_stat_set_activity_bitmap()
73 activity->bitmap[0] = activity->bitmap[1]; in in_stat_set_activity_bitmap()
74 activity->bitmap[1] = 0; in in_stat_set_activity_bitmap()
77 activity->bitmap[0] = 0; in in_stat_set_activity_bitmap()
79 activity->bitmap[0] >>= shift; in in_stat_set_activity_bitmap()
91 activity->bitmap[0] >>= shift; in in_stat_set_activity_bitmap()
97 activity->bitmap[0] |= b0_high; in in_stat_set_activity_bitmap()
[all …]
H A Din_stat.h38 uint64_t bitmap[2]; /* 128 bit map, each bit == 8 sec */ member
/xnu-11215/osfmk/arm64/
H A Dhibernate_arm64.c95 hibernate_bitmap_t * bitmap; in hibernate_page_list_allocate() local
129 bitmap = &list->bank_bitmap[0]; in hibernate_page_list_allocate()
131 bitmap->first_page = dram_ranges[bank].first_page; in hibernate_page_list_allocate()
132 bitmap->last_page = dram_ranges[bank].last_page; in hibernate_page_list_allocate()
133 bitmap->bitmapwords = (bitmap->last_page + 1 in hibernate_page_list_allocate()
134 - bitmap->first_page + 31) >> 5; in hibernate_page_list_allocate()
138 ptoa_64(bitmap->first_page), bitmap->first_page, in hibernate_page_list_allocate()
139 ptoa_64(bitmap->last_page), bitmap->last_page); in hibernate_page_list_allocate()
141 bitmap = (hibernate_bitmap_t *) &bitmap->bitmap[bitmap->bitmapwords]; in hibernate_page_list_allocate()
H A Dhibernate_restore.c149 hibernate_page_list_t *bitmap; member
184 ppnum_t ppnum = hibernate_page_list_grab(ctx->bitmap, &ctx->nextFree); in allocate_page()
185 hibernate_page_bitset(ctx->bitmap, FALSE, ppnum); in allocate_page()
286 hibernate_bitmap_t *bank_bitmap = &ctx->bitmap->bank_bitmap[0];
287 for (uint32_t bank = 0; bank < ctx->bitmap->bank_count; bank++) {
291 bank_bitmap = (hibernate_bitmap_t*)&bank_bitmap->bitmap[bank_bitmap->bitmapwords];
313 ctx.bitmap = (hibernate_page_list_t *)map_phys; in pal_hib_resume_tramp()
341 hibernate_reserve_restore_pages(header_phys, header, ctx.bitmap); in pal_hib_resume_tramp()
344 hibernate_page_list_grab(ctx.bitmap, &ctx.nextFree); in pal_hib_resume_tramp()
/xnu-11215/osfmk/kern/
H A Dbits.h64 bit_ror64(uint64_t bitmap, uint n) in bit_ror64() argument
73 return (bitmap >> n) | (bitmap << (64 - n)); in bit_ror64()
78 bit_rol64(uint64_t bitmap, uint n) in bit_rol64() argument
81 return bit_ror64(bitmap, 64U - n); in bit_rol64()
84 return (bitmap << n) | (bitmap >> (64 - n)); in bit_rol64()
92 __auto_type _map = &(bitmap); \
102 __auto_type _map = &(bitmap); \
110 bit_first(uint64_t bitmap) in bit_first() argument
117 return (bitmap == 0) ? -1 : 63 - __builtin_clzll(bitmap); in bit_first()
127 return bit_first(bitmap & mask); in __bit_next()
[all …]
H A Dmisc_protos.h61 int *bitmap);
66 int *bitmap);
70 int *bitmap);
87 int *bitmap);
H A Dsched.h245 bitmap_t bitmap[BITMAP_LEN(NRQS)]; /* run queue bitmap array */ member
282 bitmap_t bitmap[BITMAP_LEN(NRTQS)]; member
H A Dsched_prim.c162 bitmap_t *map = rt_run_queue->bitmap; in rt_runq_priority()
179 bitmap_t *map = rt_run_queue->bitmap; in check_rt_runq_consistency()
4265 rq->bitmap[i] = 0; in run_queue_init()
4306 bitmap_clear(rq->bitmap, rq->highq); in run_queue_dequeue()
4307 rq->highq = bitmap_first(rq->bitmap, NRQS); in run_queue_dequeue()
4383 rq->highq = bitmap_first(rq->bitmap, NRQS); in run_queue_remove()
4418 bitmap_t *map = rt_run_queue->bitmap; in rt_runq_enqueue()
4475 bitmap_t *map = rt_run_queue->bitmap; in rt_runq_dequeue()
4539 bitmap_t *map = rt_run_queue->bitmap; in rt_runq_first()
4559 bitmap_t *map = rt_run_queue->bitmap; in rt_runq_remove()
[all …]
/xnu-11215/iokit/Kernel/
H A DIOHibernateRestoreKernel.c319 bitmap = (hibernate_bitmap_t *) &bitmap->bitmap[bitmap->bitmapwords]; in hibernate_page_bitmap()
325 return bitmap; in hibernate_page_bitmap()
342 bitmap = (hibernate_bitmap_t *) &bitmap->bitmap[bitmap->bitmapwords]; in hibernate_page_bitmap_pin()
348 return bitmap; in hibernate_page_bitmap_pin()
357 if (bitmap) { in hibernate_page_bitset()
360 bitmap->bitmap[page >> 5] |= (0x80000000 >> (page & 31)); in hibernate_page_bitset()
364 bitmap->bitmap[page >> 5] &= ~(0x80000000 >> (page & 31)); in hibernate_page_bitset()
377 if (bitmap) { in hibernate_page_bittst()
396 bits = bitmap->bitmap[index]; in hibernate_page_bitmap_count()
406 bits = bitmap->bitmap[index]; in hibernate_page_bitmap_count()
[all …]
H A DIOHibernateIO.cpp444 hibernate_bitmap_t * bitmap; in hibernate_page_list_iterate() local
446 while ((bitmap = hibernate_page_bitmap_pin(list, &page))) { in hibernate_page_list_iterate()
447 count = hibernate_page_bitmap_count(bitmap, TRUE, page); in hibernate_page_list_iterate()
452 if (page <= bitmap->last_page) { in hibernate_page_list_iterate()
458 if (bitmap) { in hibernate_page_list_iterate()
459 count = hibernate_page_bitmap_count(bitmap, FALSE, page); in hibernate_page_list_iterate()
/xnu-11215/osfmk/i386/
H A Dhibernate_i386.c67 hibernate_bitmap_t * bitmap; in hibernate_page_list_allocate() local
200 bitmap = &list->bank_bitmap[0]; in hibernate_page_list_allocate()
202 bitmap->first_page = dram_ranges[bank].first_page; in hibernate_page_list_allocate()
203 bitmap->last_page = dram_ranges[bank].last_page; in hibernate_page_list_allocate()
204 bitmap->bitmapwords = (bitmap->last_page + 1 in hibernate_page_list_allocate()
205 - bitmap->first_page + 31) >> 5; in hibernate_page_list_allocate()
208 bank, bitmap->first_page, bitmap->last_page); in hibernate_page_list_allocate()
210 bitmap = (hibernate_bitmap_t *) &bitmap->bitmap[bitmap->bitmapwords]; in hibernate_page_list_allocate()
H A Diopb.h85 isa_iopb bitmap; /* bitmap of mapped IO ports */ member
/xnu-11215/tests/sched/sched_test_harness/shadow_headers/
H A Dsched_prim.c105 rq->bitmap[i] = 0; in run_queue_init()
143 bitmap_clear(rq->bitmap, rq->highq); in run_queue_dequeue()
144 rq->highq = bitmap_first(rq->bitmap, NRQS); in run_queue_dequeue()
170 rq_bitmap_set(rq->bitmap, thread->sched_pri); in run_queue_enqueue()
214 bitmap_clear(rq->bitmap, thread->sched_pri); in run_queue_remove()
215 rq->highq = bitmap_first(rq->bitmap, NRQS); in run_queue_remove()
/xnu-11215/bsd/vfs/
H A Dvfs_utfconv.c92 const u_int8_t *bitmap = __CFUniCharCombiningBitmap; in unicode_combinable() local
99 value = bitmap[(character >> 8) & 0xFF]; in unicode_combinable()
104 bitmap = bitmap + ((value - 1) * 32) + 256; in unicode_combinable()
105 return bitmap[(character & 0xFF) / 8] & (1 << (character % 8)) ? 1 : 0; in unicode_combinable()
118 const u_int8_t *bitmap = __CFUniCharDecomposableBitmap; in unicode_decomposeable() local
125 value = bitmap[(character >> 8) & 0xFF]; in unicode_decomposeable()
130 bitmap = bitmap + ((value - 1) * 32) + 256; in unicode_decomposeable()
145 const u_int8_t *bitmap = __CFUniCharCombiningPropertyBitmap; in get_combining_class() local
147 u_int8_t value = bitmap[(character >> 8)]; in get_combining_class()
150 bitmap = bitmap + (value * 256); in get_combining_class()
[all …]
/xnu-11215/bsd/netkey/
H A Dkeydb.c148 p->bitmap = tmp_bitmap; in keydb_newsecreplay()
157 if (p->bitmap) { in keydb_delsecreplay()
158 kfree_data_sized_by(p->bitmap, p->wsize); in keydb_delsecreplay()
H A Dkeydb.h140 caddr_t __sized_by(wsize) bitmap; /* used by receiver */
H A Dkey_debug.c675 if (rpl->bitmap == NULL) {
684 printf("%u", (((rpl->bitmap)[len] >> l) & 1) ? 1 : 0);
/xnu-11215/tools/lldbmacros/
H A Dscheduler.py621 rt_pri_bitmap = int(rt_runq.bitmap[0])
933 def bit_first(bitmap): argument
934 return bitmap.bit_length() - 1
936 def lsb_first(bitmap): argument
937 bitmap = bitmap & -bitmap
938 return bit_first(bitmap)
940 def IterateBitmap(bitmap): argument
952 i = lsb_first(bitmap)
955 bitmap = bitmap & ~((1 << (i + 1)) - 1)
956 i = lsb_first(bitmap)
/xnu-11215/tools/lldbmacros/kmemory/
H A Dzone.py167 bitmap = [
171 print(" bitmap : inline [ {} ]".format(" ".join(bitmap)))
179 bitmap = (
190 baddr, bsize, ' '.join(bitmap)))
195 next(bitmap), next(bitmap),
196 next(bitmap), next(bitmap)))
/xnu-11215/osfmk/vm/
H A Dvm_resident.c7637 hibernate_bitmap_t * bitmap; in hibernate_page_list_zero() local
7639 bitmap = &list->bank_bitmap[0]; in hibernate_page_list_zero()
7643 bzero((void *) &bitmap->bitmap[0], bitmap->bitmapwords << 2); in hibernate_page_list_zero()
7645 last_bit = ((bitmap->last_page - bitmap->first_page + 1) & 31); in hibernate_page_list_zero()
7647 bitmap->bitmap[bitmap->bitmapwords - 1] = (0xFFFFFFFF >> last_bit); in hibernate_page_list_zero()
7650 bitmap = (hibernate_bitmap_t *) &bitmap->bitmap[bitmap->bitmapwords]; in hibernate_page_list_zero()
7926 hibernate_bitmap_t * bitmap; in hibernate_page_list_setall() local
8302 bitmap = &page_list->bank_bitmap[0]; in hibernate_page_list_setall()
8305 for (i = 0; i < bitmap->bitmapwords; i++) { in hibernate_page_list_setall()
8306 bitmap->bitmap[i] = bitmap->bitmap[i] | ~bitmap_wired->bitmap[i]; in hibernate_page_list_setall()
[all …]
H A Dvm_kern.c3007 uint32_t bitmap) in kmem_get_nth_free_slot() argument
3011 while (bitmap) { in kmem_get_nth_free_slot()
3012 uint32_t count = __builtin_ctz(bitmap); in kmem_get_nth_free_slot()
3015 bitmap >>= count; in kmem_get_nth_free_slot()
3016 if (__probable(~bitmap)) { in kmem_get_nth_free_slot()
3017 count = __builtin_ctz(~bitmap); in kmem_get_nth_free_slot()
3025 bitmap >>= count; in kmem_get_nth_free_slot()
3036 uint32_t bitmap) in kmem_get_next_slot() argument
3038 uint32_t num_slots = __builtin_popcount(bitmap); in kmem_get_next_slot()
3057 return kmem_get_nth_free_slot(meta, slot_idx, bitmap); in kmem_get_next_slot()
/xnu-11215/iokit/IOKit/
H A DIOHibernatePrivate.h387 uint32_t bitmap[0]; member
643 hibernate_page_bitmap_count(hibernate_bitmap_t * bitmap, uint32_t set, uint32_t page);
/xnu-11215/bsd/netinet6/
H A Dipsec.c2879 if ((replay->bitmap)[fr] & (1 << (diff % 8))) { in ipsec_chkreplay()
2928 bzero(replay->bitmap, replay->wsize); in ipsec_updatereplay()
2929 (replay->bitmap)[frlast] = 1; in ipsec_updatereplay()
2942 (replay->bitmap)[frlast] |= 1; in ipsec_updatereplay()
2945 bzero(replay->bitmap, replay->wsize); in ipsec_updatereplay()
2946 (replay->bitmap)[frlast] = 1; in ipsec_updatereplay()
2970 (replay->bitmap)[fr] |= (1 << (diff % 8)); in ipsec_updatereplay()
3019 bitmap[0] <<= s; in vshiftl()
3021 over = (bitmap[i] >> (8 - s)); in vshiftl()
3022 bitmap[i] <<= s; in vshiftl()
[all …]
/xnu-11215/bsd/net/
H A Drestricted_in_port.c152 SYSCTL_PROC(_net_restricted_port, OID_AUTO, bitmap,
/xnu-11215/doc/lifecycle/
H A Dhibernation.md59 bitmaps of type `hibernate_bitmap_t`. There is one page bitmap per range of
66 out by iBoot that exist outside of kernel-managed memory. A page bitmap is
67 allocated for each one of these ranges (as well as a single bitmap for the

12