/freebsd/contrib/file/src/ |
H A D | is_json.c | 167 *ucp = uc; in json_parse_string() 175 *ucp = uc; in json_parse_string() 204 *ucp = uc + 1; in json_parse_array() 212 *ucp = uc; in json_parse_array() 258 *ucp = uc; in json_parse_object() 262 *ucp = uc - 1; in json_parse_object() 268 *ucp = uc; in json_parse_object() 320 *ucp = uc; in json_parse_number() 333 if (*ucp > ue) in json_parse_const() 334 *ucp = ue; in json_parse_const() [all …]
|
/freebsd/lib/libc/amd64/gen/ |
H A D | signalcontext.c | 51 if (ucp == NULL) in __signalcontext() 62 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext() 77 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext() 80 ucp->uc_link = sig_uc; in __signalcontext() 81 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext() 84 ucp->uc_mcontext.mc_rdi = (register_t)ucp; in __signalcontext() 85 ucp->uc_mcontext.mc_rsi = (register_t)func; in __signalcontext() 87 ucp->uc_mcontext.mc_rbp = (register_t)sp; in __signalcontext() 88 ucp->uc_mcontext.mc_rbx = (register_t)sp; in __signalcontext() 89 ucp->uc_mcontext.mc_rsp = (register_t)sp; in __signalcontext() [all …]
|
H A D | makecontext.c | 51 if ((ucp == NULL) || (ucp->uc_mcontext.mc_len != sizeof(mcontext_t))) in __makecontext() 54 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 61 ucp->uc_mcontext.mc_len = 0; in __makecontext() 66 sp = (uint64_t *)(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 87 ucp->uc_mcontext.mc_rdi = (register_t)ucp; in __makecontext() 88 ucp->uc_mcontext.mc_rsi = (register_t)start; in __makecontext() 89 ucp->uc_mcontext.mc_rdx = (register_t)args; in __makecontext() 90 ucp->uc_mcontext.mc_rbp = 0; in __makecontext() 91 ucp->uc_mcontext.mc_rbx = (register_t)sp; in __makecontext() 92 ucp->uc_mcontext.mc_rsp = (register_t)sp; in __makecontext() [all …]
|
/freebsd/lib/libc/powerpc/gen/ |
H A D | signalcontext.c | 51 if (ucp == NULL) in __signalcontext() 59 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext() 74 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext() 75 ucp->uc_link = sig_uc; in __signalcontext() 76 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext() 78 ucp->uc_mcontext.mc_vers = _MC_VERSION; in __signalcontext() 81 ucp->uc_mcontext.mc_gpr[1] = (uint32_t) sp; in __signalcontext() 82 ucp->uc_mcontext.mc_gpr[3] = (uint32_t) func; in __signalcontext() 83 ucp->uc_mcontext.mc_gpr[4] = (uint32_t) sig; in __signalcontext() 96 if (ucp->uc_link == NULL) in ctx_wrapper() [all …]
|
H A D | makecontext.c | 39 void _ctx_done(ucontext_t *ucp); 43 _ctx_done(ucontext_t *ucp) in _ctx_done() argument 45 if (ucp->uc_link == NULL) in _ctx_done() 49 ucp->uc_mcontext.mc_len = 0; in _ctx_done() 51 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done() 66 if ((ucp == NULL) || (argc < 0) in __makecontext() 67 || (ucp->uc_stack.ss_sp == NULL) in __makecontext() 68 || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 70 ucp->uc_mcontext.mc_len = 0; in __makecontext() 80 sp = (char *) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size in __makecontext() [all …]
|
/freebsd/lib/libc/powerpc64/gen/ |
H A D | signalcontext.c | 51 if (ucp == NULL) in __signalcontext() 59 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext() 74 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext() 75 ucp->uc_link = sig_uc; in __signalcontext() 76 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext() 78 ucp->uc_mcontext.mc_vers = _MC_VERSION; in __signalcontext() 81 ucp->uc_mcontext.mc_gpr[1] = (uint64_t) sp; in __signalcontext() 82 ucp->uc_mcontext.mc_gpr[3] = (uint64_t) func; in __signalcontext() 83 ucp->uc_mcontext.mc_gpr[4] = (uint64_t) sig; in __signalcontext() 96 if (ucp->uc_link == NULL) in ctx_wrapper() [all …]
|
H A D | makecontext.c | 39 void _ctx_done(ucontext_t *ucp); 43 _ctx_done(ucontext_t *ucp) in _ctx_done() argument 45 if (ucp->uc_link == NULL) in _ctx_done() 49 ucp->uc_mcontext.mc_len = 0; in _ctx_done() 51 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done() 66 if ((ucp == NULL) || (argc < 0) in __makecontext() 67 || (ucp->uc_stack.ss_sp == NULL) in __makecontext() 68 || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 70 ucp->uc_mcontext.mc_len = 0; in __makecontext() 80 sp = (char *) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size in __makecontext() [all …]
|
/freebsd/lib/libc/i386/gen/ |
H A D | makecontext.c | 45 _ctx_done (ucontext_t *ucp) in _ctx_done() argument 47 if (ucp->uc_link == NULL) in _ctx_done() 55 ucp->uc_mcontext.mc_len = 0; in _ctx_done() 72 if (ucp == NULL) in __makecontext() 74 else if ((ucp->uc_stack.ss_sp == NULL) || in __makecontext() 75 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext() 82 ucp->uc_mcontext.mc_len = 0; in __makecontext() 86 ucp->uc_mcontext.mc_len = 0; in __makecontext() 146 *argp = (intptr_t)ucp; in __makecontext() 157 ucp->uc_mcontext.mc_esi = (int)argp; in __makecontext() [all …]
|
H A D | signalcontext.c | 41 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 54 p = (register_t *)(void *)(intptr_t)ucp->uc_mcontext.mc_esp; in __signalcontext() 55 *--p = (register_t)(intptr_t)ucp; in __signalcontext() 64 bcopy(ucp, &sfp->sf_uc, sizeof(ucontext_t)); in __signalcontext() 71 ucp->uc_mcontext.mc_esi = ucp->uc_mcontext.mc_esp - sizeof(int); in __signalcontext() 72 ucp->uc_mcontext.mc_esp = (register_t)(intptr_t)p; in __signalcontext() 73 ucp->uc_mcontext.mc_eip = (register_t)(intptr_t)_ctx_start; in __signalcontext() 74 ucp->uc_mcontext.mc_eflags &= ~PSL_T; in __signalcontext() 75 ucp->uc_link = &sfp->sf_uc; in __signalcontext() 76 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
|
/freebsd/lib/libc/x86/gen/ |
H A D | getcontextx.c | 76 ucontext_t *ucp; in __fillcontextx2_xfpu() local 78 ucp = (ucontext_t *)ctx; in __fillcontextx2_xfpu() 79 xfpu.addr = (char *)(ucp + 1); in __fillcontextx2_xfpu() 85 ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE; in __fillcontextx2_xfpu() 92 ucontext_t *ucp; in __fillcontextx2_noxfpu() local 94 ucp = (ucontext_t *)ctx; in __fillcontextx2_noxfpu() 95 ucp->uc_mcontext.mc_xfpustate = 0; in __fillcontextx2_noxfpu() 96 ucp->uc_mcontext.mc_xfpustate_len = 0; in __fillcontextx2_noxfpu() 110 ucontext_t *ucp; in __fillcontextx() local 112 ucp = (ucontext_t *)ctx; in __fillcontextx() [all …]
|
/freebsd/tests/sys/kern/ |
H A D | basic_signal.c | 15 #define SET_TRACE_FLAG(ucp) (ucp)->uc_mcontext.mc_gpregs.gp_spsr |= PSR_SS argument 16 #define CLR_TRACE_FLAG(ucp) (ucp)->uc_mcontext.mc_gpregs.gp_spsr &= ~PSR_SS argument 19 #define SET_TRACE_FLAG(ucp) (ucp)->uc_mcontext.mc_rflags |= PSL_T argument 20 #define CLR_TRACE_FLAG(ucp) (ucp)->uc_mcontext.mc_rflags &= ~PSL_T argument 23 #define SET_TRACE_FLAG(ucp) (ucp)->uc_mcontext.mc_eflags |= PSL_T argument 24 #define CLR_TRACE_FLAG(ucp) (ucp)->uc_mcontext.mc_eflags &= ~PSL_T argument 30 sig_handler(int signo, siginfo_t *info __unused, void *ucp __unused) in sig_handler() 88 ucontext_t *ucp = _ucp; in trap_sig_handler() local 91 SET_TRACE_FLAG(ucp); in trap_sig_handler() 93 CLR_TRACE_FLAG(ucp); in trap_sig_handler() [all …]
|
/freebsd/lib/libc/aarch64/gen/ |
H A D | makecontext.c | 41 ctx_done(ucontext_t *ucp) in ctx_done() argument 44 if (ucp->uc_link == NULL) { in ctx_done() 47 setcontext((const ucontext_t *)ucp->uc_link); in ctx_done() 55 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument 62 if (ucp == NULL) in __makecontext() 68 gp = &ucp->uc_mcontext.mc_gpregs; in __makecontext() 77 gp->gp_sp = STACKALIGN(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 81 gp->gp_x[20] = (__register_t)ucp; in __makecontext()
|
H A D | getcontextx.c | 47 ucontext_t *ucp; in __fillcontextx2() local 49 ucp = (ucontext_t *)ctx; in __fillcontextx2() 50 ucp->uc_mcontext.mc_ptr = (uint64_t)(ucp + 1); in __fillcontextx2() 52 reg_ctx = (struct arm64_reg_context *)ucp->uc_mcontext.mc_ptr; in __fillcontextx2() 62 ucontext_t *ucp; in __fillcontextx() local 64 ucp = (ucontext_t *)ctx; in __fillcontextx() 65 if (getcontext(ucp) == -1) in __fillcontextx()
|
/freebsd/lib/libc/riscv/gen/ |
H A D | makecontext.c | 47 ctx_done(ucontext_t *ucp) in ctx_done() argument 50 if (ucp->uc_link == NULL) { in ctx_done() 53 setcontext((const ucontext_t *)ucp->uc_link); in ctx_done() 61 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument 68 if (ucp == NULL) in __makecontext() 74 gp = &ucp->uc_mcontext.mc_gpregs; in __makecontext() 83 gp->gp_sp = STACKALIGN(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 87 gp->gp_s[1] = (__register_t)ucp; in __makecontext()
|
/freebsd/lib/libc/arm/gen/ |
H A D | makecontext.c | 44 ctx_done(ucontext_t *ucp) in ctx_done() argument 47 if (ucp->uc_link == NULL) in ctx_done() 50 setcontext((const ucontext_t *)ucp->uc_link); in ctx_done() 58 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument 60 __greg_t *gr = ucp->uc_mcontext.__gregs; in __makecontext() 67 (((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size - in __makecontext() 78 gr[_REG_R5] = (__greg_t)ucp; in __makecontext()
|
H A D | signalcontext.c | 48 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument 51 __greg_t *gr = ucp->uc_mcontext.__gregs; in __signalcontext() 59 bcopy(ucp, &sfp->sf_uc, sizeof(*ucp)); in __signalcontext() 68 gr[_REG_R5] = (__greg_t)ucp; in __signalcontext() 73 ucp->uc_link = &sfp->sf_uc; in __signalcontext() 74 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
|
H A D | getcontextx.c | 51 ucontext_t *ucp; in __fillcontextx2() local 56 ucp = &ucxp->ucontext; in __fillcontextx2() 63 ucp->uc_mcontext.mc_vfp_size = sizeof(mcontext_vfp_t); in __fillcontextx2() 64 ucp->uc_mcontext.mc_vfp_ptr = mvp; in __fillcontextx2()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_linux.cpp | 214 static int HashContextStack(const ucontext_t &ucp) { in HashContextStack() argument 216 hash.add(reinterpret_cast<uptr>(ucp.uc_stack.ss_sp)); in HashContextStack() 217 hash.add(ucp.uc_stack.ss_size); in HashContextStack() 222 ucontext_t *ucp = reinterpret_cast<ucontext_t *>(context); in SignContextStack() local 223 ucp->uc_stack.ss_flags = HashContextStack(*ucp); in SignContextStack() 227 const ucontext_t *ucp = reinterpret_cast<const ucontext_t *>(context); in ReadContextStack() local 228 if (HashContextStack(*ucp) == ucp->uc_stack.ss_flags) { in ReadContextStack() 229 *stack = reinterpret_cast<uptr>(ucp->uc_stack.ss_sp); in ReadContextStack() 230 *ssize = ucp->uc_stack.ss_size; in ReadContextStack()
|
/freebsd/sys/kern/ |
H A D | kern_context.c | 49 struct __ucontext *ucp; member 52 const struct __ucontext_t *ucp; variable 56 const struct __ucontext_t *ucp; member 66 if (uap->ucp == NULL) in sys_getcontext() 74 ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); in sys_getcontext() 85 if (uap->ucp == NULL) in sys_setcontext() 88 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_setcontext() 106 if (uap->oucp == NULL || uap->ucp == NULL) in sys_swapcontext() 116 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_swapcontext()
|
/freebsd/sys/amd64/ia32/ |
H A D | ia32_signal.c | 261 if (uap->ucp == NULL) in freebsd32_getcontext() 280 if (uap->ucp == NULL) in freebsd32_setcontext() 756 struct ia32_freebsd4_ucontext *ucp; in freebsd4_freebsd32_sigreturn() local 763 ucp = &uc; in freebsd4_freebsd32_sigreturn() 765 eflags = ucp->uc_mcontext.mc_eflags; in freebsd4_freebsd32_sigreturn() 780 cs = ucp->uc_mcontext.mc_cs; in freebsd4_freebsd32_sigreturn() 806 regs->tf_ss = ucp->uc_mcontext.mc_ss; in freebsd4_freebsd32_sigreturn() 823 struct ia32_ucontext *ucp; in freebsd32_sigreturn() local 832 ucp = &uc; in freebsd32_sigreturn() 834 eflags = ucp->uc_mcontext.mc_eflags; in freebsd32_sigreturn() [all …]
|
/freebsd/lib/libthr/thread/ |
H A D | thr_sig.c | 198 check_cancel(curthread, ucp); in sigcancel_handler() 212 ucontext_t *ucp; in thr_sighandler() local 219 ucp = _ucp; in thr_sighandler() 239 ucp->uc_sigmask = _thr_deferset; in thr_sighandler() 298 sigfunc(sig, info, ucp); in handle_signal() 310 memcpy(&uc2, ucp, sizeof(uc2)); in handle_signal() 372 ucp? &ucp->uc_sigmask : NULL); in check_cancel() 790 if (ucp == NULL) { in __thr_setcontext() 795 return (__sys_setcontext(ucp)); in __thr_setcontext() 806 if (oucp == NULL || ucp == NULL) { in __thr_swapcontext() [all …]
|
/freebsd/sys/libkern/ |
H A D | inet_ntoa.c | 38 unsigned char *ucp = (unsigned char *)&ina; in inet_ntoa_r() local 41 ucp[0] & 0xff, in inet_ntoa_r() 42 ucp[1] & 0xff, in inet_ntoa_r() 43 ucp[2] & 0xff, in inet_ntoa_r() 44 ucp[3] & 0xff); in inet_ntoa_r()
|
/freebsd/lib/libsecureboot/ |
H A D | readfile.c | 58 unsigned char *ucp; in read_file() local 66 ucp = read_fd(fd, st.st_size); in read_file() 68 if (ucp != NULL) { in read_file() 78 return (ucp); in read_file()
|
/freebsd/sys/cddl/dev/dtrace/i386/ |
H A D | dtrace_isa.c | 156 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getustack_common() local 157 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getustack_common() 162 oldcontext = dtrace_fulword(&ucp->uc_link); in dtrace_getustack_common() 165 greg32_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getustack_common() 170 oldcontext = dtrace_fuword32(&ucp->uc_link); in dtrace_getustack_common() 380 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getufpstack() local 381 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getufpstack() 386 oldcontext = dtrace_fulword(&ucp->uc_link); in dtrace_getufpstack() 388 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getufpstack() local 389 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getufpstack() [all …]
|
/freebsd/lib/libc/gen/ |
H A D | trivial-getcontextx.c | 49 ucontext_t *ucp; in __fillcontextx() local 51 ucp = (ucontext_t *)ctx; in __fillcontextx() 52 return (getcontext(ucp)); in __fillcontextx()
|