Home
last modified time | relevance | path

Searched refs:assert (Results 1 – 25 of 548) sorted by relevance

12345678910>>...22

/xnu-10063.141.1/osfmk/tests/
H A Dbitmap_test.c62 #ifdef assert
63 #undef assert
65 #define assert(x) T_ASSERT(x, NULL) macro
78 assert(bitmap_is_full(map, nbits)); in test_bitmap()
82 assert(i == expected_result); in test_bitmap()
85 assert(expected_result == -1); in test_bitmap()
89 assert(bitmap_first(map, nbits) == -1); in test_bitmap()
90 assert(bitmap_lsb_first(map, nbits) == -1); in test_bitmap()
93 assert(bitmap_is_full(map, nbits)); in test_bitmap()
97 assert(i == expected_result); in test_bitmap()
[all …]
/xnu-10063.141.1/iokit/Tests/
H A DTests.cpp233 assert(KERN_SUCCESS == kr); in TestZLib_alloc()
806 assert(wl); in IOWorkLoopTest()
808 assert(tes); in IOWorkLoopTest()
810 assert(kIOReturnSuccess == err); in IOWorkLoopTest()
824 assert(kIOReturnSuccess == err); in IOWorkLoopTest()
835 assert(ies); in IOWorkLoopTest()
838 assert(kIOReturnSuccess == err); in IOWorkLoopTest()
869 assert(dict); in OSCollectionTest()
873 assert(str); in OSCollectionTest()
882 assert(serializer); in OSCollectionTest()
[all …]
H A DTestIOMemoryDescriptor.cpp99 assert(mds[0]); in IOMultMemoryDescriptorTest()
103 assert(0 == dmaOffset); in IOMultMemoryDescriptorTest()
104 assert(ptoa(1) == dmaLen); in IOMultMemoryDescriptorTest()
108 assert(mds[0]); in IOMultMemoryDescriptorTest()
112 assert((page_size - 2) == dmaOffset); in IOMultMemoryDescriptorTest()
113 assert(ptoa(2) == dmaLen); in IOMultMemoryDescriptorTest()
121 assert(0 == dmaOffset); in IOMultMemoryDescriptorTest()
122 assert(ptoa(8) == dmaLen); in IOMultMemoryDescriptorTest()
128 assert(0 == dmaOffset); in IOMultMemoryDescriptorTest()
129 assert(ptoa(2) == dmaLen); in IOMultMemoryDescriptorTest()
[all …]
/xnu-10063.141.1/osfmk/ipc/
H A Dipc_right.c289 assert(space != IS_NULL); in ipc_right_lookup_write()
331 assert(space != IS_NULL); in ipc_right_lookup_two_write()
380 assert(is_active(space)); in ipc_right_reverse()
381 assert(io_otype(object) == IOT_PORT); in ipc_right_reverse()
390 assert(name != MACH_PORT_NULL); in ipc_right_reverse()
394 assert(entry != IE_NULL); in ipc_right_reverse()
395 assert(entry->ie_bits & MACH_PORT_TYPE_RECEIVE); in ipc_right_reverse()
396 assert(port == ip_object_to_port(entry->ie_object)); in ipc_right_reverse()
405 assert(entry != IE_NULL); in ipc_right_reverse()
406 assert(IE_BITS_TYPE(entry->ie_bits) == MACH_PORT_TYPE_SEND); in ipc_right_reverse()
[all …]
H A Dipc_object.c155 assert(!waitq_is_valid(wq)); in ipc_object_free_safe()
156 assert(os_atomic_load(&wq->waitq_defer.mpqc_next, relaxed) == NULL); in ipc_object_free_safe()
168 assert(dq == &ipc_object_deallocate_queue); in ipc_object_deallocate_queue_invoke()
206 assert(get_preemption_level() == 0); in ipc_object_release()
353 assert(object1 != IO_NULL); in ipc_object_translate_two()
362 assert(object2 != IO_NULL); in ipc_object_translate_two()
439 assert(otype < IOT_NUMBER); in ipc_object_alloc()
440 assert((type & MACH_PORT_TYPE_ALL_RIGHTS) == type); in ipc_object_alloc()
441 assert(type != MACH_PORT_TYPE_NONE); in ipc_object_alloc()
442 assert(urefs <= MACH_PORT_UREFS_MAX); in ipc_object_alloc()
[all …]
H A Dipc_importance.c118 assert(1 < IIT_REFS(task_imp)); in ipc_importance_task_release_internal()
185 assert(IIE_NULL == kmsg->ikm_importance); in ipc_importance_kmsg_link()
245 assert(IIE_NULL == inherit->iii_from_elem); in ipc_importance_inherit_link()
333 assert(0 < IIE_REFS(elem)); in ipc_importance_reference()
348 assert(0 < IIE_REFS(elem)); in ipc_importance_release_locked()
394 assert(TASK_NULL == task_elem->iit_task); in ipc_importance_release_locked()
413 assert(IIT_NULL != to_task); in ipc_importance_release_locked()
414 assert(ipc_importance_task_is_any_receiver_type(to_task)); in ipc_importance_release_locked()
418 assert(IIE_NULL != from_elem); in ipc_importance_release_locked()
436 assert(inherit->iii_externcnt >= inherit->iii_externdrop); in ipc_importance_release_locked()
[all …]
H A Dflipc.c107 assert(IP_VALID(lport)); in flipc_port_create()
108 assert(MACH_NODE_VALID(node)); in flipc_port_create()
109 assert(MNL_NAME_VALID(name)); in flipc_port_create()
110 assert(!FPORT_VALID(lport->ip_messages.imq_fport)); in flipc_port_create()
150 assert(IP_VALID(lport)); in flipc_port_destroy()
153 assert(FPORT_VALID(fport)); in flipc_port_destroy()
154 assert(MNL_NAME_VALID(fport->obj.name)); in flipc_port_destroy()
167 assert(kmsg != IKM_NULL); in flipc_port_destroy()
331 assert(fport->peek_count >= msg_count); // Can't ack what we haven't peeked! in flipc_cmd_ack()
363 assert(MACH_NODE_VALID(node)); in flipc_node_prepare()
[all …]
/xnu-10063.141.1/libkern/kxld/tests/
H A Dkxld_array_test.c62 assert(rval == KERN_SUCCESS); in main()
63 assert(array.nitems == titems); in main()
68 assert(item); in main()
69 assert(item == kxld_array_get_slot(&array, idx)); in main()
73 assert(item); in main()
74 assert(item == kxld_array_get_slot(&array, idx)); in main()
78 assert(!item); in main()
82 assert(item == kxld_array_get_slot(&array, idx)); in main()
88 assert(rval == KERN_SUCCESS); in main()
89 assert(array.nitems == titems); in main()
[all …]
H A Dkxld_dict_test.c61 assert(result == KERN_SUCCESS); in main()
63 assert(size == 0); in main()
67 assert(b == NULL); in main()
71 assert(result == KERN_SUCCESS); in main()
73 assert(b && *(int*)b == a1); in main()
75 assert(size == 1); in main()
79 assert(result == KERN_SUCCESS); in main()
81 assert(b && *(int*)b == a2); in main()
83 assert(size == 1); in main()
88 assert(result == KERN_SUCCESS); in main()
[all …]
/xnu-10063.141.1/osfmk/kdp/output_stages/
H A Dout_lz4.c65 assert(compression_ki_ptr); in lz4_stage_reset()
67 assert(stage); in lz4_stage_reset()
68 assert(stage->kos_initialized); in lz4_stage_reset()
71 assert(data); in lz4_stage_reset()
95 assert(compression_ki_ptr); in lz4_stage_stream()
97 assert(data); in lz4_stage_stream()
98 assert(next_stage); in lz4_stage_stream()
99 assert(written); in lz4_stage_stream()
102 assert((src_buf && src_buf_size) || finalize); in lz4_stage_stream()
149 assert(stage); in lz4_stage_outproc()
[all …]
/xnu-10063.141.1/iokit/bsddev/skywalk/
H A DIOSkywalkSupport.cpp320 assert(IOSK_OFFSET_OK(regionOffset)); in OSDefineMetaClassAndFinalStructors()
326 assert(fMemoryMapCount != 0); in OSDefineMetaClassAndFinalStructors()
345 assert(fMemoryMapCount != 0); in free()
371 assert(segIndex < fMemoryMapCount); in map()
372 assert(buffer != NULL); in map()
381 assert(map->getMemoryDescriptor() == buffer); in map()
390 assert((offset + fRegion->getSegmentSize()) <= fMapper->fMapSize); in map()
395 assert((map == NULL) || (map->getLength() == fRegion->getSegmentSize())); in map()
416 assert(segIndex < fMemoryMapCount); in unmap()
425 assert((offset + fRegion->getSegmentSize()) <= fMapper->fMapSize); in unmap()
[all …]
/xnu-10063.141.1/osfmk/i386/
H A Dphys.c95 assert(pn != vm_page_fictitious_addr); in pmap_zero_page()
96 assert(pn != vm_page_guard_addr); in pmap_zero_page()
110 assert(pn != vm_page_fictitious_addr); in pmap_zero_part_page()
111 assert(pn != vm_page_guard_addr); in pmap_zero_part_page()
112 assert(offset + len <= PAGE_SIZE); in pmap_zero_part_page()
129 assert(psrc != vm_page_fictitious_addr); in pmap_copy_part_page()
130 assert(pdst != vm_page_fictitious_addr); in pmap_copy_part_page()
131 assert(psrc != vm_page_guard_addr); in pmap_copy_part_page()
132 assert(pdst != vm_page_guard_addr); in pmap_copy_part_page()
137 assert((((uintptr_t)dst & PAGE_MASK) + dst_offset + len) <= PAGE_SIZE); in pmap_copy_part_page()
[all …]
/xnu-10063.141.1/osfmk/vm/
H A Dvm_purgeable.c123 assert(queue->token_q_unripe); in vm_purgeable_token_check_queue()
125 assert(token == queue->token_q_unripe); in vm_purgeable_token_check_queue()
131 assert(queue->token_q_tail == token); in vm_purgeable_token_check_queue()
139 assert(queue->token_q_unripe == unripe); in vm_purgeable_token_check_queue()
141 assert(token_cnt == queue->debug_count_tokens); in vm_purgeable_token_check_queue()
146 assert(our_inactive_count >= 0); in vm_purgeable_token_check_queue()
147 assert((uint32_t) our_inactive_count == vm_page_inactive_count - vm_page_cleaned_count); in vm_purgeable_token_check_queue()
228 assert(token_init_idx < token_q_max_cnt); /* We must have a free token now */ in vm_purgeable_token_add()
245 assert(token); in vm_purgeable_token_add()
253 assert(pages >= 0); in vm_purgeable_token_add()
[all …]
H A Dvm_object.c135 assert(vm_object_tracking_btlog); in vm_object_tracking_init()
479 assert(object->vo_size - inner_size <= USHRT_MAX); in vm_object_set_size()
540 assert(sizeof(mo_ipc_object_bits_t) == sizeof(ipc_object_bits_t)); in vm_object_bootstrap()
743 assert(object->ref_count > 0); in vm_object_deallocate()
766 assert(object->ref_count > 0); in vm_object_deallocate()
815 assert(!object->can_persist); in vm_object_deallocate()
946 assert(object->purgable == VM_PURGABLE_DENY); in vm_object_cache_remove_locked()
976 assert(object->purgable == VM_PURGABLE_DENY); in vm_object_cache_add()
1052 assert(object->purgable == VM_PURGABLE_DENY); in vm_object_cache_evict()
1162 assert(p->vmp_pageq.next == 0 && p->vmp_pageq.prev == 0); in vm_object_cache_evict()
[all …]
H A Dvm_tests.c88 assert(backing_object != VM_OBJECT_NULL); in vm_test_collapse_compressor()
97 assert(kr == KERN_SUCCESS); in vm_test_collapse_compressor()
132 assert(backing_object->paging_offset == 0); in vm_test_collapse_compressor()
138 assert(top_object != VM_OBJECT_NULL); in vm_test_collapse_compressor()
147 assert(kr == KERN_SUCCESS); in vm_test_collapse_compressor()
268 assert(user_pmap); in vm_test_wire_and_extract()
283 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
297 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
306 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
326 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
[all …]
H A Dvm_resident.c548 assert(c <= vm_clump_size); in vm_clump_update_stats()
684 assert(vm_delayed_count > 0); in vm_get_delayed_page()
690 assert(pnum > vm_pages[vm_pages_count - 1].vmp_phys_page); in vm_get_delayed_page()
694 assert(p < vm_page_array_ending_addr); in vm_get_delayed_page()
1208 assert((unsigned int) atop_64(max_mem) == atop_64(max_mem)); in vm_page_bootstrap()
1260 assert(alignment <= PAGE_SIZE); in pmap_steal_memory_internal()
1261 assert((alignment & (alignment - 1)) == 0); in pmap_steal_memory_internal()
1505 assert(secluded_shutoff_trigger == 0 || secluded_shutoff_trigger > secluded_shutoff_headroom); in pmap_startup()
1581 assert(phys_page > vm_pages[i - 1].vmp_phys_page); in pmap_startup()
1804assert(!VM_PAGE_WIRED(mem) || mem->vmp_private || mem->vmp_fictitious || (tag != VM_KERN_MEMORY_NO… in vm_page_insert_internal()
[all …]
/xnu-10063.141.1/tests/vm/
H A Dfault_throughput.c246 assert(err == 0); in faulting_thread()
273 assert(ret == 0); in worker_thread_iteration_setup()
279 assert(ret == 0); in worker_thread_iteration_setup()
288 assert(ret == 0); in worker_thread_iteration_setup()
292 assert(ret == 0); in worker_thread_iteration_setup()
306 assert(ret == 0); in worker_thread_iteration_complete()
312 assert(ret == 0); in worker_thread_iteration_complete()
317 assert(ret == 0); in worker_thread_iteration_complete()
321 assert(ret == 0); in worker_thread_iteration_complete()
356 assert(ret == 0); in grab_and_fault_pages()
[all …]
/xnu-10063.141.1/osfmk/kern/
H A Dkern_apfs_reflock.c87 assert(reflock->kern_apfs_rl_allow_force == 0); in kern_apfs_reflock_destroy()
88 assert(reflock->kern_apfs_rl_waiters == 0); in kern_apfs_reflock_destroy()
89 assert(reflock->kern_apfs_rl_delayed_free == 0); in kern_apfs_reflock_destroy()
104 assert(reflock->kern_apfs_rl_waiters == 0); in kern_apfs_reflock_free_internal()
105 assert(reflock->kern_apfs_rl_owner == 0); in kern_apfs_reflock_free_internal()
106 assert(reflock->kern_apfs_rl_allow_force == 0); in kern_apfs_reflock_free_internal()
107 assert(reflock->kern_apfs_rl_wake == 0); in kern_apfs_reflock_free_internal()
108 assert(reflock->kern_apfs_rl_allocated == 1); in kern_apfs_reflock_free_internal()
109 assert(reflock->kern_apfs_rl_delayed_free == 1); in kern_apfs_reflock_free_internal()
146 assert(reflock->kern_apfs_rl_wake == 0); in kern_apfs_reflock_free()
[all …]
H A Dworkload_config.c186 assert(id != NULL); in lookup_entry()
187 assert(ctx->wlcc_hashtbl != NULL); in lookup_entry()
208 assert(entry != NULL); in lookup_config()
209 assert(phase != NULL); in lookup_config()
230 assert(entry != NULL); in insert_config()
231 assert(phase != NULL); in insert_config()
232 assert(new_config != NULL); in insert_config()
261 assert(id != NULL); in insert_entry()
262 assert(phase != NULL); in insert_entry()
263 assert(config != NULL); in insert_entry()
[all …]
H A Dkpc_common.c85 assert(cpu_data); in kpc_register_cpu()
86 assert(cpu_data->cpu_kpc_buf[0] == NULL); in kpc_register_cpu()
87 assert(cpu_data->cpu_kpc_buf[1] == NULL); in kpc_register_cpu()
88 assert(cpu_data->cpu_kpc_shadow == NULL); in kpc_register_cpu()
89 assert(cpu_data->cpu_kpc_reload == NULL); in kpc_register_cpu()
126 assert(cpu_data); in kpc_unregister_cpu()
148 assert(task); in kpc_task_set_forced_all_ctrs()
217 assert(force_all_ctrs == available_to_pm); in kpc_pm_acknowledge()
251 assert(ctr < (kpc_fixed_count() + kpc_configurable_count())); in kpc_controls_counter()
301 assert(buf); in kpc_get_curcpu_counters()
[all …]
H A Dpriority.c105 assert(processor == current_processor()); in thread_quantum_expire()
106 assert(thread == current_thread()); in thread_quantum_expire()
288 assert(priority >= MINPRI); in sched_set_thread_base_priority()
292 assert((priority >= BASEPRI_RTQUEUES) && (priority <= MAXPRI)); in sched_set_thread_base_priority()
294 assert(priority < BASEPRI_RTQUEUES); in sched_set_thread_base_priority()
305 assert(thread->last_made_runnable_time != THREAD_NOT_RUNNABLE); in sched_set_thread_base_priority()
309 assert(thread->last_basepri_change_time == THREAD_NOT_RUNNABLE); in sched_set_thread_base_priority()
310 assert(thread->last_made_runnable_time == THREAD_NOT_RUNNABLE); in sched_set_thread_base_priority()
348 assert(thread->sched_mode != TH_MODE_REALTIME); in sched_set_kernel_thread_priority()
349 assert(thread->effective_policy.thep_qos == THREAD_QOS_UNSPECIFIED); in sched_set_kernel_thread_priority()
[all …]
H A Dwork_interval.c260assert(work_interval_status_auto_join_count(old_status) < WORK_INTERVAL_STATUS_AUTO_JOIN_COUNT_MAX… in work_interval_auto_join_increment()
282 assert(work_interval_status_auto_join_count(old_status) > 0); in work_interval_auto_join_decrement()
304 assert(thread->thread_group == work_interval->wi_group); in work_interval_auto_join_decrement()
457 assert(from == current_thread()); in work_interval_auto_join_propagate()
462 assert(kr == KERN_SUCCESS); in work_interval_auto_join_propagate()
477 assert(kr == KERN_SUCCESS); in work_interval_auto_join_unwind()
495 assert(kr == KERN_SUCCESS); in work_interval_auto_join_demote()
504 assert(dq == &work_interval_deallocate_queue); in work_interval_deallocate_queue_invoke()
505 assert(os_ref_get_count(&work_interval->wi_ref_count) == 0); in work_interval_deallocate_queue_invoke()
578 assert(IP_VALID(port)); in port_name_to_work_interval()
[all …]
/xnu-10063.141.1/osfmk/arm64/sptm/pmap/
H A Dpmap_data.h319 assert(was_preemptible || (startup_phase < STARTUP_SUB_EARLY_BOOT) || !not_in_kdp); in pvh_lock()
391 assert(locked_pvh.pvh != 0); in pvh_try_lock()
412 assert(locked_pvh != NULL); in pvh_try_lock_success()
433 assert(locked_pvh != NULL); in pvh_lock_enter_sleep_mode()
434 assert(locked_pvh->pvh != 0); in pvh_lock_enter_sleep_mode()
446 assert(preemption_enabled()); in pvh_lock_enter_sleep_mode()
479 assert(locked_pvh != NULL); in pvh_unlock()
480 assert(locked_pvh->pvh != 0); in pvh_unlock()
528 assert(pvh_test_type(pvh, PVH_TYPE_PTEP)); in pvh_ptep()
546 assert(pvh_test_type(pvh, PVH_TYPE_PVEP)); in pvh_pve_list()
[all …]
H A Dpmap_data.c304 assert(ptd_per_page > 0); in pmap_data_bootstrap()
315 assert((ptd_info_offset - pt_desc_bytes) < l2_cline_bytes); in pmap_data_bootstrap()
349 assert(error == SPTM_SUCCESS); in pmap_data_bootstrap()
457 assert(ppa != NULL); in pmap_page_alloc()
550 assert(mem != VM_PAGE_NULL); in pmap_page_free()
551 assert(VM_PAGE_WIRED(mem)); in pmap_page_free()
592 assert((free_list->count == PV_BATCH_SIZE) && (free_list->list != PV_ENTRY_NULL)); in pv_free_array_get_batch()
612 assert(batch_head != NULL); in pv_free_array_give_batch()
640 assert(pvepp != NULL); in pv_free_list_alloc()
641 assert(((free_list->list != NULL) && (free_list->count > 0)) || in pv_free_list_alloc()
[all …]
/xnu-10063.141.1/libkern/os/
H A Dlog_queue.c166 assert(state != LOG_QUEUE_ENTRY_STATE_INVALID); in log_queue_entry_state()
179 assert(lqe_size <= lq->lq_cnt_mem_avail); in log_queue_entry_alloc()
181 assert(lqe_size <= UINT16_MAX); in log_queue_entry_alloc()
210 assert(lqe->lqe_size >= lp->lp_data_size); in log_queue_add_entry()
233 assert(lqe_state != LOG_QUEUE_ENTRY_STATE_STORED); in dispatch_list_cleanup()
260 assert(lqe_state != LOG_QUEUE_ENTRY_STATE_STORED); in log_dispatch_prepare()
271 assert(collected < requested); in log_dispatch_prepare()
274 assert(log_queue_entry_state(lqe) == LOG_QUEUE_ENTRY_STATE_STORED); in log_dispatch_prepare()
351 assert(buf); in log_queue_mem_init()
352 assert(buflen > 0); in log_queue_mem_init()
[all …]

12345678910>>...22