| /NextBSD/lib/libc/amd64/gen/ |
| HD | signalcontext.c | 39 static void sigctx_wrapper(ucontext_t *ucp, handler_t func, uint64_t *args); 44 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 52 if (ucp == NULL) in __signalcontext() 61 sp = (ucp->uc_mcontext.mc_rsp - 128 - sizeof(ucontext_t)) & ~15UL; in __signalcontext() 63 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext() 78 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext() 79 ucp->uc_mcontext.mc_fpformat = _MC_FPFMT_NODEV; in __signalcontext() 80 ucp->uc_mcontext.mc_ownedfp = _MC_FPOWNED_NONE; in __signalcontext() 81 ucp->uc_link = sig_uc; in __signalcontext() 82 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext() [all …]
|
| HD | makecontext.c | 39 static void makectx_wrapper(ucontext_t *ucp, func_t func, uint64_t *args); 44 __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) in __makecontext() argument 52 if ((ucp == NULL) || (ucp->uc_mcontext.mc_len != sizeof(mcontext_t))) in __makecontext() 54 else if ((argc < 0) || (argc > 6) || (ucp->uc_stack.ss_sp == NULL) || in __makecontext() 55 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 62 ucp->uc_mcontext.mc_len = 0; in __makecontext() 67 sp = (uint64_t *)(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 88 ucp->uc_mcontext.mc_rdi = (register_t)ucp; in __makecontext() 89 ucp->uc_mcontext.mc_rsi = (register_t)start; in __makecontext() 90 ucp->uc_mcontext.mc_rdx = (register_t)args; in __makecontext() [all …]
|
| HD | getcontextx.c | 63 ucontext_t *ucp; in __fillcontextx2() local 65 ucp = (ucontext_t *)ctx; in __fillcontextx2() 67 xfpu.addr = (char *)(ucp + 1); in __fillcontextx2() 71 ucp->uc_mcontext.mc_xfpustate = (__register_t)xfpu.addr; in __fillcontextx2() 72 ucp->uc_mcontext.mc_xfpustate_len = xstate_sz; in __fillcontextx2() 73 ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE; in __fillcontextx2() 75 ucp->uc_mcontext.mc_xfpustate = 0; in __fillcontextx2() 76 ucp->uc_mcontext.mc_xfpustate_len = 0; in __fillcontextx2() 84 ucontext_t *ucp; in __fillcontextx() local 86 ucp = (ucontext_t *)ctx; in __fillcontextx() [all …]
|
| /NextBSD/lib/libc/powerpc64/gen/ |
| HD | signalcontext.c | 39 static void ctx_wrapper(ucontext_t *ucp, handler_t func, uint32_t sig, 45 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 52 if (ucp == NULL) in __signalcontext() 58 sp = (ucp->uc_mcontext.mc_gpr[1] - sizeof(ucontext_t)) & ~15UL; in __signalcontext() 60 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext() 75 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext() 76 ucp->uc_link = sig_uc; in __signalcontext() 77 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext() 79 ucp->uc_mcontext.mc_vers = _MC_VERSION; in __signalcontext() 80 ucp->uc_mcontext.mc_len = sizeof(struct __mcontext); in __signalcontext() [all …]
|
| HD | makecontext.c | 40 void _ctx_done(ucontext_t *ucp); 44 _ctx_done(ucontext_t *ucp) in _ctx_done() argument 46 if (ucp->uc_link == NULL) in _ctx_done() 50 ucp->uc_mcontext.mc_len = 0; in _ctx_done() 52 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done() 59 __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) in __makecontext() argument 67 if ((ucp == NULL) || (argc < 0) || (argc > NCARGS) in __makecontext() 68 || (ucp->uc_stack.ss_sp == NULL) in __makecontext() 69 || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 71 ucp->uc_mcontext.mc_len = 0; in __makecontext() [all …]
|
| /NextBSD/lib/libc/powerpc/gen/ |
| HD | signalcontext.c | 39 static void ctx_wrapper(ucontext_t *ucp, handler_t func, uint32_t sig, 45 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 52 if (ucp == NULL) in __signalcontext() 58 sp = (ucp->uc_mcontext.mc_gpr[1] - sizeof(ucontext_t)) & ~15UL; in __signalcontext() 60 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext() 75 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext() 76 ucp->uc_link = sig_uc; in __signalcontext() 77 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext() 79 ucp->uc_mcontext.mc_vers = _MC_VERSION; in __signalcontext() 80 ucp->uc_mcontext.mc_len = sizeof(struct __mcontext); in __signalcontext() [all …]
|
| HD | makecontext.c | 40 void _ctx_done(ucontext_t *ucp); 44 _ctx_done(ucontext_t *ucp) in _ctx_done() argument 46 if (ucp->uc_link == NULL) in _ctx_done() 50 ucp->uc_mcontext.mc_len = 0; in _ctx_done() 52 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done() 59 __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) in __makecontext() argument 67 if ((ucp == NULL) || (argc < 0) || (argc > NCARGS) in __makecontext() 68 || (ucp->uc_stack.ss_sp == NULL) in __makecontext() 69 || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 71 ucp->uc_mcontext.mc_len = 0; in __makecontext() [all …]
|
| /NextBSD/lib/libc/i386/gen/ |
| HD | makecontext.c | 46 _ctx_done (ucontext_t *ucp) in _ctx_done() argument 48 if (ucp->uc_link == NULL) in _ctx_done() 56 ucp->uc_mcontext.mc_len = 0; in _ctx_done() 60 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done() 66 __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) in __makecontext() argument 73 if (ucp == NULL) in __makecontext() 75 else if ((ucp->uc_stack.ss_sp == NULL) || in __makecontext() 76 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 83 ucp->uc_mcontext.mc_len = 0; in __makecontext() 87 ucp->uc_mcontext.mc_len = 0; in __makecontext() [all …]
|
| HD | getcontextx.c | 95 ucontext_t *ucp; in __fillcontextx2() local 97 ucp = (ucontext_t *)ctx; in __fillcontextx2() 99 xfpu.addr = (char *)(ucp + 1); in __fillcontextx2() 103 ucp->uc_mcontext.mc_xfpustate = (__register_t)xfpu.addr; in __fillcontextx2() 104 ucp->uc_mcontext.mc_xfpustate_len = xstate_sz; in __fillcontextx2() 105 ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE; in __fillcontextx2() 107 ucp->uc_mcontext.mc_xfpustate = 0; in __fillcontextx2() 108 ucp->uc_mcontext.mc_xfpustate_len = 0; in __fillcontextx2() 116 ucontext_t *ucp; in __fillcontextx() local 118 ucp = (ucontext_t *)ctx; in __fillcontextx() [all …]
|
| HD | signalcontext.c | 42 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 55 p = (register_t *)(void *)(intptr_t)ucp->uc_mcontext.mc_esp; in __signalcontext() 56 *--p = (register_t)(intptr_t)ucp; in __signalcontext() 65 bcopy(ucp, &sfp->sf_uc, sizeof(ucontext_t)); in __signalcontext() 72 ucp->uc_mcontext.mc_esi = ucp->uc_mcontext.mc_esp - sizeof(int); in __signalcontext() 73 ucp->uc_mcontext.mc_esp = (register_t)(intptr_t)p; in __signalcontext() 74 ucp->uc_mcontext.mc_eip = (register_t)(intptr_t)_ctx_start; in __signalcontext() 75 ucp->uc_mcontext.mc_eflags &= ~PSL_T; in __signalcontext() 76 ucp->uc_link = &sfp->sf_uc; in __signalcontext() 77 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
|
| /NextBSD/lib/libc/sparc64/gen/ |
| HD | makecontext.c | 44 void _ctx_done(ucontext_t *ucp); 48 __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) in __makecontext() argument 55 mc = &ucp->uc_mcontext; in __makecontext() 56 if (ucp == NULL || in __makecontext() 60 (ucp->uc_stack.ss_sp == NULL) || in __makecontext() 61 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 65 mc = &ucp->uc_mcontext; in __makecontext() 66 sp = (uint64_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size; in __makecontext() 72 mc->mc_global[2] = (uint64_t)ucp; in __makecontext() 79 _ctx_done(ucontext_t *ucp) in _ctx_done() argument [all …]
|
| HD | signalcontext.c | 48 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 54 mc = &ucp->uc_mcontext; in __signalcontext() 61 bcopy(ucp, &sfp->sf_uc, sizeof(*ucp)); in __signalcontext() 65 mc->mc_global[2] = (uint64_t)ucp; in __signalcontext() 73 ucp->uc_link = &sfp->sf_uc; in __signalcontext() 74 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
|
| /NextBSD/sys/libkern/ |
| HD | inet_ntoa.c | 42 unsigned char *ucp = (unsigned char *)&ina; in inet_ntoa() local 45 ucp[0] & 0xff, in inet_ntoa() 46 ucp[1] & 0xff, in inet_ntoa() 47 ucp[2] & 0xff, in inet_ntoa() 48 ucp[3] & 0xff); in inet_ntoa() 55 unsigned char *ucp = (unsigned char *)&ina; in inet_ntoa_r() local 58 ucp[0] & 0xff, in inet_ntoa_r() 59 ucp[1] & 0xff, in inet_ntoa_r() 60 ucp[2] & 0xff, in inet_ntoa_r() 61 ucp[3] & 0xff); in inet_ntoa_r()
|
| /NextBSD/lib/libc/mips/gen/ |
| HD | makecontext.c | 53 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument 66 if (argc < 0 || argc > 6 || ucp == NULL || in __makecontext() 67 ucp->uc_stack.ss_sp == NULL || in __makecontext() 68 ucp->uc_stack.ss_size < MINSIGSTKSZ) in __makecontext() 70 mc = &ucp->uc_mcontext; in __makecontext() 73 ((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 85 mc->mc_regs[S0] = (intptr_t)ucp; in __makecontext() 114 _ctx_done(ucontext_t *ucp) in _ctx_done() argument 117 if (ucp->uc_link == NULL) in _ctx_done() 120 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done()
|
| /NextBSD/lib/libc/aarch64/gen/ |
| HD | makecontext.c | 45 ctx_done(ucontext_t *ucp) in ctx_done() argument 48 if (ucp->uc_link == NULL) { in ctx_done() 51 setcontext((const ucontext_t *)ucp->uc_link); in ctx_done() 59 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument 66 if (ucp == NULL) in __makecontext() 72 gp = &ucp->uc_mcontext.mc_gpregs; in __makecontext() 81 gp->gp_sp = STACKALIGN(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 85 gp->gp_x[20] = (__register_t)ucp; in __makecontext()
|
| /NextBSD/sys/amd64/ia32/ |
| HD | ia32_signal.c | 260 if (uap->ucp == NULL) in freebsd32_getcontext() 268 ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); in freebsd32_getcontext() 279 if (uap->ucp == NULL) in freebsd32_setcontext() 282 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in freebsd32_setcontext() 300 if (uap->oucp == NULL || uap->ucp == NULL) in freebsd32_swapcontext() 309 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in freebsd32_swapcontext() 765 struct ia32_ucontext4 *ucp; local 772 ucp = &uc; 774 eflags = ucp->uc_mcontext.mc_eflags; 789 cs = ucp->uc_mcontext.mc_cs; [all …]
|
| /NextBSD/lib/libc/arm/gen/ |
| HD | makecontext.c | 45 ctx_done(ucontext_t *ucp) in ctx_done() argument 48 if (ucp->uc_link == NULL) in ctx_done() 51 setcontext((const ucontext_t *)ucp->uc_link); in ctx_done() 59 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument 61 __greg_t *gr = ucp->uc_mcontext.__gregs; in __makecontext() 68 (((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size - in __makecontext() 79 gr[_REG_R5] = (__greg_t)ucp; in __makecontext()
|
| HD | signalcontext.c | 49 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 52 __greg_t *gr = ucp->uc_mcontext.__gregs; in __signalcontext() 60 bcopy(ucp, &sfp->sf_uc, sizeof(*ucp)); in __signalcontext() 69 gr[_REG_R5] = (__greg_t)ucp; in __signalcontext() 74 ucp->uc_link = &sfp->sf_uc; in __signalcontext() 75 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
|
| /NextBSD/lib/libthr/thread/ |
| HD | thr_sig.c | 70 static void check_cancel(struct pthread *curthread, ucontext_t *ucp); 134 siginfo_t *info __unused, ucontext_t *ucp) in sigcancel_handler() argument 143 check_cancel(curthread, ucp); in sigcancel_handler() 157 ucontext_t *ucp; in thr_sighandler() local 164 ucp = _ucp; in thr_sighandler() 182 curthread->deferred_sigmask = ucp->uc_sigmask; in thr_sighandler() 184 ucp->uc_sigmask = _thr_deferset; in thr_sighandler() 188 handle_signal(&act, sig, info, ucp); in thr_sighandler() 192 handle_signal(struct sigaction *actp, int sig, siginfo_t *info, ucontext_t *ucp) in handle_signal() argument 204 SIGSETOR(actp->sa_mask, ucp->uc_sigmask); in handle_signal() [all …]
|
| /NextBSD/sys/kern/ |
| HD | kern_context.c | 51 struct __ucontext *ucp; member 54 const struct __ucontext_t *ucp; variable 58 const struct __ucontext_t *ucp; member 68 if (uap->ucp == NULL) in sys_getcontext() 76 ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); in sys_getcontext() 87 if (uap->ucp == NULL) in sys_setcontext() 90 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_setcontext() 108 if (uap->oucp == NULL || uap->ucp == NULL) in sys_swapcontext() 118 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_swapcontext()
|
| HD | init_main.c | 710 char *ucp, **uap, *arg0, *arg1; in start_init() local 756 ucp = (char *)p->p_sysent->sv_usrstack; in start_init() 757 (void)subyte(--ucp, 0); /* trailing zero */ in start_init() 759 (void)subyte(--ucp, 's'); in start_init() 764 (void)subyte(--ucp, 'f'); in start_init() 770 (void)subyte(--ucp, 'C'); in start_init() 775 (void)subyte(--ucp, '-'); in start_init() 776 (void)subyte(--ucp, '-'); /* leading hyphen */ in start_init() 777 arg1 = ucp; in start_init() 782 (void)subyte(--ucp, 0); in start_init() [all …]
|
| /NextBSD/sys/cddl/dev/dtrace/i386/ |
| HD | dtrace_isa.c | 159 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getustack_common() local 160 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getustack_common() 165 oldcontext = dtrace_fulword(&ucp->uc_link); in dtrace_getustack_common() 167 ucontext32_t *ucp = (ucontext32_t *)oldcontext; in dtrace_getustack_common() local 168 greg32_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getustack_common() 173 oldcontext = dtrace_fuword32(&ucp->uc_link); in dtrace_getustack_common() 383 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getufpstack() local 384 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getufpstack() 389 oldcontext = dtrace_fulword(&ucp->uc_link); in dtrace_getufpstack() 391 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getufpstack() local [all …]
|
| /NextBSD/lib/libc/gen/ |
| HD | trivial-getcontextx.c | 52 ucontext_t *ucp; in __fillcontextx() local 54 ucp = (ucontext_t *)ctx; in __fillcontextx() 55 return (getcontext(ucp)); in __fillcontextx()
|
| /NextBSD/lib/libmemstat/ |
| HD | memstat_uma.c | 302 struct uma_cache *ucp, *ucp_array; in memstat_kvm_uma() local 410 ucp = &ucp_array[i]; in memstat_kvm_uma() 411 mtp->mt_numallocs += ucp->uc_allocs; in memstat_kvm_uma() 412 mtp->mt_numfrees += ucp->uc_frees; in memstat_kvm_uma() 414 if (ucp->uc_allocbucket != NULL) { in memstat_kvm_uma() 415 ret = kread(kvm, ucp->uc_allocbucket, in memstat_kvm_uma() 425 if (ucp->uc_freebucket != NULL) { in memstat_kvm_uma() 426 ret = kread(kvm, ucp->uc_freebucket, in memstat_kvm_uma()
|
| /NextBSD/contrib/compiler-rt/lib/asan/ |
| HD | asan_linux.cc | 166 ucontext_t *ucp = (ucontext_t*)context; in ReadContextStack() local 167 *stack = (uptr)ucp->uc_stack.ss_sp; in ReadContextStack() 168 *ssize = ucp->uc_stack.ss_size; in ReadContextStack()
|