Home
last modified time | relevance | path

Searched refs:ucp (Results 1 – 25 of 66) sorted by relevance

123

/freebsd-13.1/lib/libc/amd64/gen/
H A Dsignalcontext.c54 if (ucp == NULL) in __signalcontext()
65 bcopy(ucp, sig_uc, sizeof(*sig_uc)); in __signalcontext()
80 bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); in __signalcontext()
83 ucp->uc_link = sig_uc; in __signalcontext()
84 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
87 ucp->uc_mcontext.mc_rdi = (register_t)ucp; in __signalcontext()
88 ucp->uc_mcontext.mc_rsi = (register_t)func; in __signalcontext()
90 ucp->uc_mcontext.mc_rbp = (register_t)sp; in __signalcontext()
91 ucp->uc_mcontext.mc_rbx = (register_t)sp; in __signalcontext()
92 ucp->uc_mcontext.mc_rsp = (register_t)sp; in __signalcontext()
[all …]
H A Dmakecontext.c54 if ((ucp == NULL) || (ucp->uc_mcontext.mc_len != sizeof(mcontext_t))) in __makecontext()
57 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext()
64 ucp->uc_mcontext.mc_len = 0; in __makecontext()
69 sp = (uint64_t *)(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext()
90 ucp->uc_mcontext.mc_rdi = (register_t)ucp; in __makecontext()
91 ucp->uc_mcontext.mc_rsi = (register_t)start; in __makecontext()
92 ucp->uc_mcontext.mc_rdx = (register_t)args; in __makecontext()
93 ucp->uc_mcontext.mc_rbp = 0; in __makecontext()
94 ucp->uc_mcontext.mc_rbx = (register_t)sp; in __makecontext()
95 ucp->uc_mcontext.mc_rsp = (register_t)sp; in __makecontext()
[all …]
/freebsd-13.1/contrib/file/src/
H A Dis_json.c122 const unsigned char *uc = *ucp; in json_parse_string()
158 *ucp = uc; in json_parse_string()
167 *ucp = uc; in json_parse_string()
192 *ucp = uc + 1; in json_parse_array()
201 *ucp = uc; in json_parse_array()
246 *ucp = uc; in json_parse_object()
250 *ucp = uc - 1; in json_parse_object()
257 *ucp = uc; in json_parse_object()
307 *ucp = uc; in json_parse_number()
324 *ucp = uc; in json_parse_const()
[all …]
/freebsd-13.1/lib/libc/powerpc64/gen/
H A Dsignalcontext.c54 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()
78 ucp->uc_link = sig_uc; in __signalcontext()
79 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
81 ucp->uc_mcontext.mc_vers = _MC_VERSION; in __signalcontext()
84 ucp->uc_mcontext.mc_gpr[1] = (uint64_t) sp; in __signalcontext()
85 ucp->uc_mcontext.mc_gpr[3] = (uint64_t) func; in __signalcontext()
86 ucp->uc_mcontext.mc_gpr[4] = (uint64_t) sig; in __signalcontext()
99 if (ucp->uc_link == NULL) in ctx_wrapper()
[all …]
H A Dmakecontext.c42 void _ctx_done(ucontext_t *ucp);
46 _ctx_done(ucontext_t *ucp) in _ctx_done() argument
48 if (ucp->uc_link == NULL) in _ctx_done()
52 ucp->uc_mcontext.mc_len = 0; in _ctx_done()
54 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done()
69 if ((ucp == NULL) || (argc < 0) in __makecontext()
70 || (ucp->uc_stack.ss_sp == NULL) in __makecontext()
71 || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext()
73 ucp->uc_mcontext.mc_len = 0; in __makecontext()
83 sp = (char *) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size in __makecontext()
[all …]
/freebsd-13.1/lib/libc/powerpc/gen/
H A Dsignalcontext.c54 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()
78 ucp->uc_link = sig_uc; in __signalcontext()
79 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
81 ucp->uc_mcontext.mc_vers = _MC_VERSION; in __signalcontext()
84 ucp->uc_mcontext.mc_gpr[1] = (uint32_t) sp; in __signalcontext()
85 ucp->uc_mcontext.mc_gpr[3] = (uint32_t) func; in __signalcontext()
86 ucp->uc_mcontext.mc_gpr[4] = (uint32_t) sig; in __signalcontext()
99 if (ucp->uc_link == NULL) in ctx_wrapper()
[all …]
H A Dmakecontext.c42 void _ctx_done(ucontext_t *ucp);
46 _ctx_done(ucontext_t *ucp) in _ctx_done() argument
48 if (ucp->uc_link == NULL) in _ctx_done()
52 ucp->uc_mcontext.mc_len = 0; in _ctx_done()
54 setcontext((const ucontext_t *)ucp->uc_link); in _ctx_done()
69 if ((ucp == NULL) || (argc < 0) in __makecontext()
70 || (ucp->uc_stack.ss_sp == NULL) in __makecontext()
71 || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext()
73 ucp->uc_mcontext.mc_len = 0; in __makecontext()
83 sp = (char *) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size in __makecontext()
[all …]
/freebsd-13.1/lib/libc/i386/gen/
H A Dmakecontext.c48 _ctx_done (ucontext_t *ucp) in _ctx_done() argument
50 if (ucp->uc_link == NULL) in _ctx_done()
58 ucp->uc_mcontext.mc_len = 0; in _ctx_done()
75 if (ucp == NULL) in __makecontext()
77 else if ((ucp->uc_stack.ss_sp == NULL) || in __makecontext()
78 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext()
85 ucp->uc_mcontext.mc_len = 0; in __makecontext()
89 ucp->uc_mcontext.mc_len = 0; in __makecontext()
149 *argp = (intptr_t)ucp; in __makecontext()
160 ucp->uc_mcontext.mc_esi = (int)argp; in __makecontext()
[all …]
H A Dsignalcontext.c44 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument
57 p = (register_t *)(void *)(intptr_t)ucp->uc_mcontext.mc_esp; in __signalcontext()
58 *--p = (register_t)(intptr_t)ucp; in __signalcontext()
67 bcopy(ucp, &sfp->sf_uc, sizeof(ucontext_t)); in __signalcontext()
74 ucp->uc_mcontext.mc_esi = ucp->uc_mcontext.mc_esp - sizeof(int); in __signalcontext()
75 ucp->uc_mcontext.mc_esp = (register_t)(intptr_t)p; in __signalcontext()
76 ucp->uc_mcontext.mc_eip = (register_t)(intptr_t)_ctx_start; in __signalcontext()
77 ucp->uc_mcontext.mc_eflags &= ~PSL_T; in __signalcontext()
78 ucp->uc_link = &sfp->sf_uc; in __signalcontext()
79 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
/freebsd-13.1/lib/libc/x86/gen/
H A Dgetcontextx.c79 ucontext_t *ucp; in __fillcontextx2_xfpu() local
81 ucp = (ucontext_t *)ctx; in __fillcontextx2_xfpu()
82 xfpu.addr = (char *)(ucp + 1); in __fillcontextx2_xfpu()
88 ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE; in __fillcontextx2_xfpu()
95 ucontext_t *ucp; in __fillcontextx2_noxfpu() local
97 ucp = (ucontext_t *)ctx; in __fillcontextx2_noxfpu()
98 ucp->uc_mcontext.mc_xfpustate = 0; in __fillcontextx2_noxfpu()
99 ucp->uc_mcontext.mc_xfpustate_len = 0; in __fillcontextx2_noxfpu()
113 ucontext_t *ucp; in __fillcontextx() local
115 ucp = (ucontext_t *)ctx; in __fillcontextx()
[all …]
/freebsd-13.1/tests/sys/kern/
H A Dbasic_signal.c15 #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-13.1/lib/libc/mips/gen/
H A Dmakecontext.c57 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument
70 if (argc < 0 || ucp == NULL || in __makecontext()
71 ucp->uc_stack.ss_sp == NULL || in __makecontext()
72 ucp->uc_stack.ss_size < MINSIGSTKSZ) in __makecontext()
74 mc = &ucp->uc_mcontext; in __makecontext()
77 ((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext()
86 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()
/freebsd-13.1/lib/libc/aarch64/gen/
H A Dmakecontext.c45 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()
/freebsd-13.1/lib/libc/riscv/gen/
H A Dmakecontext.c50 ctx_done(ucontext_t *ucp) in ctx_done() argument
53 if (ucp->uc_link == NULL) { in ctx_done()
56 setcontext((const ucontext_t *)ucp->uc_link); in ctx_done()
64 __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) in __makecontext() argument
71 if (ucp == NULL) in __makecontext()
77 gp = &ucp->uc_mcontext.mc_gpregs; in __makecontext()
86 gp->gp_sp = STACKALIGN(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext()
90 gp->gp_s[1] = (__register_t)ucp; in __makecontext()
/freebsd-13.1/lib/libc/arm/gen/
H A Dmakecontext.c47 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
63 __greg_t *gr = ucp->uc_mcontext.__gregs; in __makecontext()
70 (((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size - in __makecontext()
81 gr[_REG_R5] = (__greg_t)ucp; in __makecontext()
H A Dsignalcontext.c51 __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) in __signalcontext() argument
54 __greg_t *gr = ucp->uc_mcontext.__gregs; in __signalcontext()
62 bcopy(ucp, &sfp->sf_uc, sizeof(*ucp)); in __signalcontext()
71 gr[_REG_R5] = (__greg_t)ucp; in __signalcontext()
76 ucp->uc_link = &sfp->sf_uc; in __signalcontext()
77 sigdelset(&ucp->uc_sigmask, sig); in __signalcontext()
H A Dgetcontextx.c54 ucontext_t *ucp; in __fillcontextx2() local
59 ucp = &ucxp->ucontext; in __fillcontextx2()
66 ucp->uc_mcontext.mc_vfp_size = sizeof(mcontext_vfp_t); in __fillcontextx2()
67 ucp->uc_mcontext.mc_vfp_ptr = mvp; in __fillcontextx2()
/freebsd-13.1/sys/kern/
H A Dkern_context.c53 struct __ucontext *ucp; member
56 const struct __ucontext_t *ucp; variable
60 const struct __ucontext_t *ucp; member
70 if (uap->ucp == NULL) in sys_getcontext()
78 ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); in sys_getcontext()
89 if (uap->ucp == NULL) in sys_setcontext()
92 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_setcontext()
110 if (uap->oucp == NULL || uap->ucp == NULL) in sys_swapcontext()
120 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_swapcontext()
/freebsd-13.1/sys/amd64/ia32/
H A Dia32_signal.c264 if (uap->ucp == NULL) in freebsd32_getcontext()
283 if (uap->ucp == NULL) in freebsd32_setcontext()
759 struct ia32_ucontext4 *ucp; in freebsd4_freebsd32_sigreturn() local
766 ucp = &uc; in freebsd4_freebsd32_sigreturn()
768 eflags = ucp->uc_mcontext.mc_eflags; in freebsd4_freebsd32_sigreturn()
783 cs = ucp->uc_mcontext.mc_cs; in freebsd4_freebsd32_sigreturn()
809 regs->tf_ss = ucp->uc_mcontext.mc_ss; in freebsd4_freebsd32_sigreturn()
826 struct ia32_ucontext *ucp; in freebsd32_sigreturn() local
835 ucp = &uc; in freebsd32_sigreturn()
837 eflags = ucp->uc_mcontext.mc_eflags; in freebsd32_sigreturn()
[all …]
/freebsd-13.1/lib/libthr/thread/
H A Dthr_sig.c201 check_cancel(curthread, ucp); in sigcancel_handler()
215 ucontext_t *ucp; in thr_sighandler() local
222 ucp = _ucp; in thr_sighandler()
242 ucp->uc_sigmask = _thr_deferset; in thr_sighandler()
301 sigfunc(sig, info, ucp); in handle_signal()
313 memcpy(&uc2, ucp, sizeof(uc2)); in handle_signal()
375 ucp? &ucp->uc_sigmask : NULL); in check_cancel()
793 if (ucp == NULL) { in __thr_setcontext()
798 return (__sys_setcontext(ucp)); in __thr_setcontext()
809 if (oucp == NULL || ucp == NULL) { in __thr_swapcontext()
[all …]
/freebsd-13.1/sys/libkern/
H A Dinet_ntoa.c41 unsigned char *ucp = (unsigned char *)&ina; in inet_ntoa_r() local
44 ucp[0] & 0xff, in inet_ntoa_r()
45 ucp[1] & 0xff, in inet_ntoa_r()
46 ucp[2] & 0xff, in inet_ntoa_r()
47 ucp[3] & 0xff); in inet_ntoa_r()
/freebsd-13.1/lib/libsecureboot/
H A Dreadfile.c58 unsigned char *ucp; in read_file() local
66 ucp = read_fd(fd, st.st_size); in read_file()
68 if (len != NULL && ucp != NULL) in read_file()
70 return (ucp); in read_file()
/freebsd-13.1/sys/cddl/dev/dtrace/i386/
H A Ddtrace_isa.c158 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getustack_common() local
159 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getustack_common()
164 oldcontext = dtrace_fulword(&ucp->uc_link); in dtrace_getustack_common()
167 greg32_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getustack_common()
172 oldcontext = dtrace_fuword32(&ucp->uc_link); in dtrace_getustack_common()
382 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getufpstack() local
383 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getufpstack()
388 oldcontext = dtrace_fulword(&ucp->uc_link); in dtrace_getufpstack()
390 ucontext_t *ucp = (ucontext_t *)oldcontext; in dtrace_getufpstack() local
391 greg_t *gregs = ucp->uc_mcontext.gregs; in dtrace_getufpstack()
[all …]
/freebsd-13.1/lib/libc/gen/
H A Dtrivial-getcontextx.c52 ucontext_t *ucp; in __fillcontextx() local
54 ucp = (ucontext_t *)ctx; in __fillcontextx()
55 return (getcontext(ucp)); in __fillcontextx()
/freebsd-13.1/contrib/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_linux.cpp73 ucontext_t *ucp = (ucontext_t *)context; in ReadContextStack() local
74 *stack = (uptr)ucp->uc_stack.ss_sp; in ReadContextStack()
75 *ssize = ucp->uc_stack.ss_size; in ReadContextStack()

123