| /xnu-11215/bsd/sys/ |
| H A D | queue.h | 266 #define SLIST_EMPTY(head) ((head)->slh_first == NULL) argument 268 #define SLIST_FIRST(head) ((head)->slh_first) argument 364 #define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) argument 366 #define STAILQ_FIRST(head) ((head)->stqh_first) argument 524 #define LIST_EMPTY(head) ((head)->lh_first == NULL) argument 526 #define LIST_FIRST(head) ((head)->lh_first) argument 664 #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) argument 666 #define TAILQ_FIRST(head) ((head)->tqh_first) argument 861 #define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) argument 863 #define CIRCLEQ_FIRST(head) ((head)->cqh_first) argument [all …]
|
| /xnu-11215/osfmk/kern/ |
| H A D | circle_queue.h | 46 queue_entry_t head; member 58 return cq->head; in circle_queue_first() 97 if (head == NULL) { in circle_enqueue_tail() 103 elt->next = head; in circle_enqueue_tail() 106 head->prev = elt; in circle_enqueue_tail() 117 cq->head = elt; in circle_enqueue_head() 131 cq->head = NULL; in circle_dequeue() 170 s_head = sq->head; in circle_queue_concat_tail() 180 d_head = dq->head; in circle_queue_concat_tail() 182 dq->head = s_head; in circle_queue_concat_tail() [all …]
|
| H A D | queue.h | 473 #define qe_foreach(qe, head) \ argument 474 for (qe = (head)->next; qe != (head); qe = (qe)->next) 491 #define qe_foreach_safe(qe, head) \ argument 494 qe != (head); \ 514 &((elt)->field) != (head); \ 539 &((elt)->field) != (head); \ 566 if (_tmp_entry != (queue_entry_t) head) \ 575 if (_tmp_entry != (queue_entry_t) head) \ 584 if (_tmp_entry != (queue_entry_t) head) \ 593 if (_tmp_entry != (queue_entry_t) head) \ [all …]
|
| H A D | smr.h | 300 #define smrq_init(head) ({ \ argument 316 #define smrq_empty(head) \ argument 317 (smr_unsafe_load(&(head)->first) == 0) 326 #define smrq_entered_first(head, type_t, field) \ argument 347 #define smrq_entered_foreach(it, head, field) \ argument 476 #define smrq_serialized_remove(head, elem) ({ \ argument 519 #define smrq_serialized_iter(it, head, field) \ argument 1174 __smrq_lastp(struct smrq_stailq_head *head) in __smrq_lastp() argument 1176 __smrq_slink_t **last = &head->last; in __smrq_lastp() 1184 __smrq_lastp(struct smrq_tailq_head *head) in __smrq_lastp() argument [all …]
|
| H A D | mpsc_queue.c | 50 os_atomic_store(&last->mpqc_next, head, relaxed); in mpsc_queue_restore_batch() 52 if (head == NULL && in mpsc_queue_restore_batch() 54 head = os_atomic_load(&q->mpqh_head.mpqc_next, relaxed); in mpsc_queue_restore_batch() 55 if (__improbable(head == NULL)) { in mpsc_queue_restore_batch() 58 os_atomic_store(&last->mpqc_next, head, relaxed); in mpsc_queue_restore_batch() 68 mpsc_queue_chain_t head, tail; in mpsc_queue_dequeue_batch() local 78 head = os_atomic_load(&q->mpqh_head.mpqc_next, relaxed); in mpsc_queue_dequeue_batch() 79 if (__improbable(head == NULL)) { in mpsc_queue_dequeue_batch() 100 return head; in mpsc_queue_dequeue_batch() 267 mpsc_queue_chain_t head, cur, tail; in _mpsc_daemon_queue_drain() local [all …]
|
| H A D | mpqueue.h | 16 struct queue_entry head; /* header for queue */ member 27 queue_init(&(q)->head); \ 35 enqueue_tail(&(q)->head, elt); \ 42 if (queue_empty(&(q)->head)) \ 45 *(elt) = dequeue_head(&(q)->head); \
|
| /xnu-11215/libkern/libkern/ |
| H A D | tree.h | 108 #define SPLAY_ROOT(head) (head)->sph_root argument 109 #define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) argument 113 SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ 127 (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ 133 (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ 221 (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ 224 (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ 289 void name##_SPLAY_MINMAX(struct name *head, int __comp) \ 338 (x) = SPLAY_NEXT(name, head, x)) 367 #define RB_ROOT(head) (head)->rbh_root argument [all …]
|
| /xnu-11215/tests/ |
| H A D | queue.c | 40 static queue_head_t head; variable 44 queue_init(&head); 49 queue_enter(&head, e, struct qe_t2 *, link); 56 check_queue(&head, (int[]){ 2, 3, 4, }, 3); 60 check_queue(&head, (int[]){ 3, 4, }, 2); 64 check_queue(&head, (int[]){ 3 }, 1); 67 queue_remove(&head, e, struct qe_t2 *, link); 69 check_queue(&head, (int[]){ }, 0); 72 check_queue(&head, (int[]){ 1, }, 1); 75 check_queue(&head, (int[]){ 2, 1, }, 2); [all …]
|
| /xnu-11215/iokit/DriverKit/ |
| H A D | queue_implementation.h | 473 #define qe_foreach(qe, head) \ argument 474 for (qe = (head)->next; qe != (head); qe = (qe)->next) 491 #define qe_foreach_safe(qe, head) \ argument 494 qe != (head); \ 514 &((elt)->field) != (head); \ 539 &((elt)->field) != (head); \ 566 if (_tmp_entry != (queue_entry_t) head) \ 575 if (_tmp_entry != (queue_entry_t) head) \ 584 if (_tmp_entry != (queue_entry_t) head) \ 593 if (_tmp_entry != (queue_entry_t) head) \ [all …]
|
| /xnu-11215/iokit/Kernel/ |
| H A D | IOSharedDataQueue.cpp | 196 headSize = head->size; in peek() 211 entry = (IODataQueueEntry *)head; in peek() 221 UInt32 head; in enqueue() local 230 head = __c11_atomic_load((_Atomic UInt32 *)&dataQueue->head, __ATOMIC_ACQUIRE); in enqueue() 241 if (tail >= head) { in enqueue() 278 if ((head - tail) > entrySize) { in enqueue() 292 if (tail != head) { in enqueue() 303 head = __c11_atomic_load((_Atomic UInt32 *)&dataQueue->head, __ATOMIC_RELAXED); in enqueue() 306 if (tail == head) { in enqueue() 342 headSize = head->size; in dequeue() [all …]
|
| H A D | IODataQueue.cpp | 165 UInt32 head; in enqueue() local 180 head = __c11_atomic_load((_Atomic UInt32 *)&dataQueue->head, __ATOMIC_ACQUIRE); in enqueue() 184 if ((queueSize < tail) || (queueSize < head)) { in enqueue() 188 if (tail >= head) { in enqueue() 202 } else if (head > entrySize) { // Is there enough room at the beginning? in enqueue() 225 if ((head - tail) > entrySize) { in enqueue() 239 if (tail != head) { in enqueue() 250 head = __c11_atomic_load((_Atomic UInt32 *)&dataQueue->head, __ATOMIC_RELAXED); in enqueue() 253 if (tail == head) { in enqueue()
|
| /xnu-11215/libsyscall/mach/ |
| H A D | vm_reclaim.c | 113 uint64_t idx = 0, head = 0; in mach_vm_reclaim_mark_free() local 122 head = os_atomic_load_wide(&indices->head, relaxed); in mach_vm_reclaim_mark_free() 131 head = os_atomic_load_wide(&indices->head, relaxed); in mach_vm_reclaim_mark_free() 133 _assert("mach_vm_reclaim_mark_free", (idx + 1) % buffer_len != head % buffer_len, head); in mach_vm_reclaim_mark_free() 160 uint64_t head = 0, busy = 0, original_tail = 0; in mach_vm_reclaim_mark_free_with_id() local 166 head = os_atomic_load_wide(&indices->head, relaxed); in mach_vm_reclaim_mark_free_with_id() 167 if (id < head) { in mach_vm_reclaim_mark_free_with_id() 220 head = os_atomic_load_wide(&indices->head, relaxed); in mach_vm_reclaim_mark_used() 221 if (id < head) { in mach_vm_reclaim_mark_used() 297 uint64_t head = os_atomic_load_wide(&indices->head, relaxed); in mach_vm_reclaim_is_reclaimed() local [all …]
|
| /xnu-11215/san/memory/ |
| H A D | ubsan_log.c | 104 ubsan_log_recorded(size_t head, size_t tail) in ubsan_log_recorded() argument 106 if (head >= tail) { in ubsan_log_recorded() 107 return head - tail; in ubsan_log_recorded() 109 return ubsan_log_size - (tail - head + 1); in ubsan_log_recorded() 117 size_t head, tail; variable 119 head = os_atomic_load(&ubsan_log_head, relaxed); 123 size_t nentries = ubsan_log_recorded(head, tail); 155 size_t head, tail; variable 157 head = os_atomic_load(&ubsan_log_head, relaxed); 161 size_t nentries = ubsan_log_recorded(head, tail); [all …]
|
| /xnu-11215/iokit/System/ |
| H A D | IODataQueueDispatchSourceShared.h | 9 volatile uint32_t head; member 437 entry = head; in DequeueWithCoalesce() 495 uint32_t head; in EnqueueWithCoalesce() local 511 head = __c11_atomic_load((_Atomic uint32_t *)&dataQueue->head, __ATOMIC_ACQUIRE); in EnqueueWithCoalesce() 529 if (tail >= head) { in EnqueueWithCoalesce() 589 if (tail != head) { in EnqueueWithCoalesce() 600 head = __c11_atomic_load((_Atomic uint32_t *)&dataQueue->head, __ATOMIC_RELAXED); in EnqueueWithCoalesce() 603 if (tail == head) { in EnqueueWithCoalesce() 627 uint32_t head; in CanEnqueueData() local 641 head = __c11_atomic_load((_Atomic uint32_t *)&dataQueue->head, __ATOMIC_ACQUIRE); in CanEnqueueData() [all …]
|
| /xnu-11215/bsd/netinet/ |
| H A D | tcp_cache.c | 339 head = &tcp_cache[hash]; in tcp_getcache_with_lock() 395 *headarg = head; in tcp_getcache_with_lock() 400 tcp_cache_unlock(head); in tcp_getcache_with_lock() 457 tcp_cache_unlock(head); in tcp_cache_set_cookie_common() 484 tcp_cache_unlock(head); in tcp_cache_get_cookie_common() 497 tcp_cache_unlock(head); in tcp_cache_get_cookie_common() 535 tcp_cache_unlock(head); in tcp_cache_get_cookie_len_common() 579 tcp_cache_unlock(head); in tcp_cache_get_mptcp_version() 646 tcp_cache_unlock(head); in tcp_cache_update_mptcp_version() 760 *headarg = head; in tcp_getheuristic_with_lock() [all …]
|
| /xnu-11215/osfmk/vm/ |
| H A D | vm_page.h | 459 vm_page_packed_t __pck_head = VM_PAGE_PACK_PTR(head); \ 460 vm_page_packed_t __pck_prev = (head)->prev; \ 463 (head)->next = __pck_elt; \ 471 (head)->prev = __pck_elt; \ 531 vm_page_packed_t __pck_next = (head)->next; \ 532 vm_page_packed_t __pck_head = VM_PAGE_PACK_PTR(head); \ 536 (head)->prev = __pck_elt; \ 599 vm_page_packed_t __pck_head = VM_PAGE_PACK_PTR(head); \ 603 (entry) = (vm_page_t)VM_PAGE_UNPACK_PTR((head)->next); \ 608 (head)->prev = __pck_head; \ [all …]
|
| /xnu-11215/bsd/net/ |
| H A D | radix.h | 368 struct radix_node_head *head, struct radix_node nodes[]); 373 (void *v, void *mask, struct radix_node_head *head); 375 (void *v, void *mask, struct radix_node_head *head); 377 (void *v, struct radix_node_head *head); 380 (void *v, struct radix_node_head *head, 383 (void *v, void *mask, struct radix_node_head *head); 386 (void *v, void *mask, struct radix_node_head *head, 389 (void *v, struct radix_node_head *head); 391 (struct radix_node_head *head, walktree_f_t *f, void *w); 393 (struct radix_node_head *head, void *a, void *m, [all …]
|
| H A D | mblist.h | 45 mbuf_t head; member 60 if (list->head == NULL) { in mblist_append() 61 list->head = m; in mblist_append() 73 VERIFY(append.head != NULL); in mblist_append_list() 74 if (list->head == NULL) { in mblist_append_list() 78 list->tail->m_nextpkt = append.head; in mblist_append_list()
|
| /xnu-11215/tools/lldbmacros/core/ |
| H A D | kernelcore.py | 43 head = headval.GetSBValue() 46 head.Dereference() if head.TypeIsPointerType() else head, 65 head = headval.GetSBValue() 86 head = headval.GetSBValue() 89 head.Dereference() if head.TypeIsPointerType() else head, 115 head = queue_head.GetSBValue() 118 head.Dereference() if head.TypeIsPointerType() else head, 138 head = queue_head.GetSBValue() 141 head.Dereference() if head.TypeIsPointerType() else head, 167 head = queue_head.GetSBValue() [all …]
|
| /xnu-11215/bsd/net/classq/ |
| H A D | classq_subr.c | 405 head, tail, cnt, len, grp_idx); in ifclassq_dequeue_common_default() 422 IFCQ_TBR_DEQUEUE(ifq, head, grp_idx); in ifclassq_dequeue_common_default() 425 if (head->cp_mbuf == NULL) { in ifclassq_dequeue_common_default() 430 first = *head; in ifclassq_dequeue_common_default() 433 switch (head->cp_ptype) { in ifclassq_dequeue_common_default() 435 head->cp_mbuf->m_nextpkt = NULL; in ifclassq_dequeue_common_default() 436 l += head->cp_mbuf->m_pkthdr.len; in ifclassq_dequeue_common_default() 445 head->cp_kpkt->pkt_nextpkt = NULL; in ifclassq_dequeue_common_default() 446 l += head->cp_kpkt->pkt_length; in ifclassq_dequeue_common_default() 460 last = *head; in ifclassq_dequeue_common_default() [all …]
|
| H A D | classq.c | 375 struct mq_head *head = &qmbufq(q); in _getq_tail_mbuf() local 376 struct mbuf *m = MBUFQ_LAST(head); in _getq_tail_mbuf() 402 VERIFY(m == MBUFQ_FIRST(head)); in _getq_tail_mbuf() 403 MBUFQ_INIT(head); in _getq_tail_mbuf() 406 head->mq_last = &MBUFQ_NEXT(n); in _getq_tail_mbuf() 447 VERIFY(MBUFQ_EMPTY(head)); in _getq_random_mbuf() 454 m = MBUFQ_FIRST(head); in _getq_random_mbuf() 460 (head)->mq_last = &MBUFQ_FIRST(head); in _getq_random_mbuf() 523 m0 = MBUFQ_FIRST(head); in _removeq_mbuf() 538 mtail = &MBUFQ_FIRST(head); in _removeq_mbuf() [all …]
|
| /xnu-11215/libkern/zlib/ |
| H A D | inflate.c | 145 state->head = Z_NULL; in inflateReset() 627 if (state->head != Z_NULL) in inflate() 628 state->head->done = -1; in inflate() 670 if (state->head != Z_NULL) in inflate() 678 if (state->head != Z_NULL) in inflate() 679 state->head->time = hold; in inflate() 686 if (state->head != Z_NULL) { in inflate() 783 if (state->head != Z_NULL) { in inflate() 785 state->head->done = 1; in inflate() 1265 state->head = head; in inflateGetHeader() [all …]
|
| /xnu-11215/iokit/IOKit/ |
| H A D | IOKitDebug.h | 288 void IOTrackingQueueFree(IOTrackingQueue * head); 290 void IOTrackingAdd(IOTrackingQueue * head, IOTracking * mem, size_t size, bool address… 291 void IOTrackingRemove(IOTrackingQueue * head, IOTracking * mem, size_t size); 292 void IOTrackingRemoveAddress(IOTrackingQueue * head, IOTrackingAddress * mem, size_t s… 294 void IOTrackingRemoveUser(IOTrackingQueue * head, IOTrackingUser * tracking); 296 void IOTrackingAlloc(IOTrackingQueue * head, uintptr_t address, size_t size); 297 void IOTrackingFree(IOTrackingQueue * head, uintptr_t address, size_t size); 298 void IOTrackingReset(IOTrackingQueue * head); 299 void IOTrackingAccumSize(IOTrackingQueue * head, IOTracking * mem, size_t size);
|
| /xnu-11215/bsd/kern/ |
| H A D | uipc_socket2.c | 225 head->so_incqlen--; in soisconnected() 235 sorwakeup(head); in soisconnected() 331 mutex_held = (*head->so_proto->pr_getlock)(head, 0); in sonewconn_internal() 352 so_qlen = head->so_qlen - head->so_incqlen; in sonewconn_internal() 359 (soqlimitcompat ? head->so_qlimit : (3 * head->so_qlimit / 2))) { in sonewconn_internal() 362 so = soalloc(1, SOCK_DOM(head), head->so_type); in sonewconn_internal() 414 if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat)) { in sonewconn_internal() 457 so->so_head = head; in sonewconn_internal() 474 head->so_incqlen++; in sonewconn_internal() 476 head->so_qlen++; in sonewconn_internal() [all …]
|
| /xnu-11215/bsd/security/audit/ |
| H A D | audit_mac.c | 109 struct mac_audit_record *head, *next; in audit_mac_free() local 128 head = LIST_FIRST(ar->k_ar.ar_mac_records); in audit_mac_free() 129 while (head != NULL) { in audit_mac_free() 130 next = LIST_NEXT(head, records); in audit_mac_free() 131 zfree(mac_audit_data_zone, head->data); in audit_mac_free() 132 kfree_type(struct mac_audit_record, head); in audit_mac_free() 133 head = next; in audit_mac_free()
|