| /xnu-11215/tests/ |
| H A D | signal_exit_reason.c | 120 dispatch_semaphore_t sem = dispatch_semaphore_create(0); in wait_collect_exit_reason() local 123 dispatch_semaphore_signal(sem); in wait_collect_exit_reason() 128 dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER); in wait_collect_exit_reason() 130 dispatch_release(sem); in wait_collect_exit_reason() 138 dispatch_semaphore_t sem = dispatch_semaphore_create(0); in wait_with_timeout_expected() local 141 dispatch_semaphore_signal(sem); in wait_with_timeout_expected() 146 timeout = dispatch_semaphore_wait(sem, milestone); in wait_with_timeout_expected() 149 dispatch_release(sem); in wait_with_timeout_expected()
|
| H A D | poll_select_kevent_paired_fds.c | 108 semaphore_t sem; member 133 semaphore_signal(shared.wr_wait.sem); in wake_writer() 151 kern_return_t kret = semaphore_timedwait(shared.wr_wait.sem, READ_SETUP_timeout); in writer_wait() 795 T_ASSERT_MACH_SUCCESS(semaphore_create(mach_task_self(), &shared.wr_wait.sem, SYNC_POLICY_FIFO, 0), in drive_threads()
|
| H A D | stackshot_block_owner_14362384.m | 424 semaphore_t *sem = (semaphore_t *)arg; 425 semaphore_wait(*sem); 567 semaphore_t sem; 573 ret = semaphore_create(mach_task_self(), &sem, SYNC_POLICY_FIFO, 0); 576 …ret = pthread_create(&tid, NULL, sem_grabbing_thread, (void*)&sem); // thread should immediately b… 591 ret = semaphore_signal(sem); 595 ret = semaphore_destroy(mach_task_self(), sem);
|
| H A D | proc_info.c | 228 dispatch_semaphore_t sem = NULL; variable 314 sem = dispatch_semaphore_create(0); 321 dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER); 330 if (sem) { 332 dispatch_semaphore_signal(sem);
|
| /xnu-11215/bsd/sys/ |
| H A D | sem_internal.h | 62 struct sem *sem_base; /* 32 bit base ptr for semaphore set */ 129 #define SEMMNS (1048576/sizeof(struct sem))
|
| H A D | sem.h | 132 struct sem { struct
|
| H A D | Makefile | 43 …select.h sem.h semaphore.h shm.h signal.h signalvar.h snapshot.h socket.h socketvar.h sockio.h sta… 160 sbuf.h posix_sem.h posix_shm.h resource_private.h sem.h shm.h \
|
| H A D | pthread_shims.h | 85 …ruct proc *p, user_addr_t stackaddr, size_t size, uint32_t kthport, uint32_t sem, int32_t *retval);
|
| /xnu-11215/osfmk/kern/ |
| H A D | sync_sema.c | 1141 semaphore_t sem = __container_of(waitq, struct semaphore, waitq); in kdp_sema_find_owner() local 1144 zone_id_require(ZONE_ID_SEMAPHORE, sizeof(*sem), sem); in kdp_sema_find_owner() 1146 waitinfo->context = VM_KERNEL_UNSLIDE_OR_PERM(sem->port); in kdp_sema_find_owner() 1147 if (sem->owner) { in kdp_sema_find_owner() 1148 waitinfo->owner = pid_from_task(sem->owner); in kdp_sema_find_owner()
|
| /xnu-11215/bsd/pthread/ |
| H A D | pthread_shims.c | 370 mach_port_name_t sem = (mach_port_name_t)uap->sema_or_ulock; in bsdthread_terminate() local 386 if (uap->sema_or_ulock && uap->sema_or_ulock != ipc_entry_name_mask(sem)) { in bsdthread_terminate() 391 sem = thp = MACH_PORT_NULL; in bsdthread_terminate() 394 return pthread_functions->bsdthread_terminate(p, uap->stackaddr, uap->freesize, thp, sem, retval); in bsdthread_terminate()
|
| /xnu-11215/bsd/kern/ |
| H A D | posix_sem.c | 159 SYSCTL_NODE(_kern_posix, OID_AUTO, sem, CTLFLAG_RW | CTLFLAG_LOCKED, 0, "Semaphores"); 784 int fd = CAST_DOWN_EXPLICIT(int, uap->sem); in sem_close() 814 int fd = CAST_DOWN_EXPLICIT(int, uap->sem); in sem_wait_nocancel() 872 int fd = CAST_DOWN_EXPLICIT(int, uap->sem); in sem_trywait() 936 int fd = CAST_DOWN_EXPLICIT(int, uap->sem); in sem_post()
|
| H A D | sysv_sem.c | 128 static struct sem *sem_pool = NULL; /* semaphore pool */ 327 struct sem *new_sem_pool = NULL; in grow_sem_pool() 341 sizeof(struct sem) * seminfo.semmns, in grow_sem_pool() 342 sizeof(struct sem) * new_pool_size, in grow_sem_pool() 981 struct sem *semptr = NULL; /* protected by 'if' */ in semop() 1620 SYSCTL_PROC(_kern_sysv_ipcs, OID_AUTO, sem, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_LOCKED,
|