Lines Matching refs:uap

116 sys_thr_create(struct thread *td, struct thr_create_args *uap)
122 if ((error = copyin(uap->ctx, &args.ctx, sizeof(args.ctx))))
124 args.tid = uap->id;
129 sys_thr_new(struct thread *td, struct thr_new_args *uap)
135 if (uap->param_size < 0 || uap->param_size > sizeof(param))
138 if ((error = copyin(uap->param, &param, uap->param_size)))
297 sys_thr_self(struct thread *td, struct thr_self_args *uap)
302 error = suword_lwpid(uap->id, (unsigned)td->td_tid);
309 sys_thr_exit(struct thread *td, struct thr_exit_args *uap)
316 if ((void *)uap->state != NULL) {
317 (void)suword_lwpid(uap->state, 1);
318 (void)kern_umtx_wake(td, uap->state, INT_MAX, 0);
388 sys_thr_kill(struct thread *td, struct thr_kill_args *uap)
398 ksi.ksi_signo = uap->sig;
402 if (uap->id == -1) {
403 if (uap->sig != 0 && !_SIG_VALID(uap->sig)) {
411 if (uap->sig == 0)
413 tdksignal(ttd, uap->sig, &ksi);
420 ttd = tdfind((lwpid_t)uap->id, p->p_pid);
423 if (uap->sig == 0)
425 else if (!_SIG_VALID(uap->sig))
428 tdksignal(ttd, uap->sig, &ksi);
435 sys_thr_kill2(struct thread *td, struct thr_kill2_args *uap)
443 AUDIT_ARG_SIGNUM(uap->sig);
446 ksi.ksi_signo = uap->sig;
450 if (uap->id == -1) {
451 if ((p = pfind(uap->pid)) == NULL)
454 error = p_cansignal(td, p, uap->sig);
459 if (uap->sig != 0 && !_SIG_VALID(uap->sig)) {
466 if (uap->sig == 0)
468 tdksignal(ttd, uap->sig, &ksi);
474 ttd = tdfind((lwpid_t)uap->id, uap->pid);
479 error = p_cansignal(td, p, uap->sig);
480 if (uap->sig == 0)
482 else if (!_SIG_VALID(uap->sig))
485 tdksignal(ttd, uap->sig, &ksi);
492 sys_thr_suspend(struct thread *td, struct thr_suspend_args *uap)
499 if (uap->timeout != NULL) {
500 error = umtx_copyin_timeout(uap->timeout, &ts);
554 sys_thr_wake(struct thread *td, struct thr_wake_args *uap)
560 if (uap->id == td->td_tid) {
566 ttd = tdfind((lwpid_t)uap->id, p->p_pid);
578 sys_thr_set_name(struct thread *td, struct thr_set_name_args *uap)
587 if (uap->name != NULL) {
588 error = copyinstr(uap->name, name, sizeof(name), NULL);
590 error = copyin(uap->name, name, sizeof(name) - 1);
597 ttd = tdfind((lwpid_t)uap->id, p->p_pid);