/glibc-2.36/sysdeps/unix/sysv/linux/riscv/ |
D | makecontext.c | 26 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, in __makecontext() argument 36 sp = ((long int) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ALMASK; in __makecontext() 42 ucp->uc_mcontext.__gregs[REG_RA] = 0; in __makecontext() 43 ucp->uc_mcontext.__gregs[REG_S0] = 0; in __makecontext() 44 ucp->uc_mcontext.__gregs[REG_S1] = (long int) func; in __makecontext() 45 ucp->uc_mcontext.__gregs[REG_S2] = (long int) ucp->uc_link; in __makecontext() 46 ucp->uc_mcontext.__gregs[REG_SP] = sp; in __makecontext() 47 ucp->uc_mcontext.__gregs[REG_PC] = (long int) &__start_context; in __makecontext() 50 ucp->uc_mcontext.__gregs[REG_A0 + 0] = a0; in __makecontext() 51 ucp->uc_mcontext.__gregs[REG_A0 + 1] = a1; in __makecontext() [all …]
|
/glibc-2.36/sysdeps/unix/sysv/linux/loongarch/ |
D | makecontext.c | 27 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, long int a0, in __makecontext() argument 38 (((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ALMASK); in __makecontext() 44 ucp->uc_mcontext.__gregs[LARCH_REG_RA] = (uintptr_t) 0; in __makecontext() 45 ucp->uc_mcontext.__gregs[LARCH_REG_S0] = (uintptr_t) 0; in __makecontext() 46 ucp->uc_mcontext.__gregs[LARCH_REG_S1] = (uintptr_t) func; in __makecontext() 47 ucp->uc_mcontext.__gregs[LARCH_REG_S2] = (uintptr_t) ucp->uc_link; in __makecontext() 48 ucp->uc_mcontext.__gregs[LARCH_REG_SP] = (uintptr_t) sp; in __makecontext() 49 ucp->uc_mcontext.__pc = (uintptr_t) &__start_context; in __makecontext() 52 ucp->uc_mcontext.__gregs[LARCH_REG_A0 + 0] = (uintptr_t) a0; in __makecontext() 53 ucp->uc_mcontext.__gregs[LARCH_REG_A0 + 1] = (uintptr_t) a1; in __makecontext() [all …]
|
/glibc-2.36/sysdeps/unix/sysv/linux/x86_64/ |
D | makecontext.c | 56 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 67 sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp in __makecontext() 68 + ucp->uc_stack.ss_size); in __makecontext() 77 ucp->uc_mcontext.gregs[REG_RIP] = (uintptr_t) func; in __makecontext() 79 ucp->uc_mcontext.gregs[REG_RBX] = (uintptr_t) &sp[idx_uc_link]; in __makecontext() 80 ucp->uc_mcontext.gregs[REG_RSP] = (uintptr_t) sp; in __makecontext() 93 - (uintptr_t) ucp->uc_stack.ss_sp) in __makecontext() 98 ucp->__ssp[1] = ssp_size; in __makecontext() 99 ucp->__ssp[2] = ssp_size; in __makecontext() 108 __push___start_context (ucp); in __makecontext() [all …]
|
/glibc-2.36/sysdeps/unix/sysv/linux/sparc/sparc64/ |
D | makecontext.c | 23 extern void __start_context (ucontext_t *ucp); 26 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 33 sp = (unsigned long *) ((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 38 ucp->uc_mcontext.mc_gregs[MC_PC] = (long) func; in __makecontext() 39 ucp->uc_mcontext.mc_gregs[MC_NPC] = ((long) func) + 4; in __makecontext() 40 ucp->uc_mcontext.mc_gregs[MC_O6] = ((long) sp) - 0x7ff; in __makecontext() 41 ucp->uc_mcontext.mc_gregs[MC_O7] = ((long) __start_context) - 8; in __makecontext() 42 ucp->uc_mcontext.mc_fp = ((long) topsp) - 0x7ff; in __makecontext() 43 ucp->uc_mcontext.mc_i7 = 0; in __makecontext() 46 sp[8] = (long) ucp->uc_link; in __makecontext() [all …]
|
D | swapcontext.c | 20 extern int __getcontext (ucontext_t *ucp); 21 extern int __setcontext (const ucontext_t *ucp, int restoremask); 24 __swapcontext (ucontext_t *oucp, const ucontext_t *ucp) in __swapcontext() argument 33 __setcontext (ucp, 1); in __swapcontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/hppa/ |
D | makecontext.c | 38 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 47 if (ucp->uc_stack.ss_sp && ucp->uc_stack.ss_size) in __makecontext() 48 osp = (unsigned long *)ucp->uc_stack.ss_sp; in __makecontext() 50 osp = (unsigned long *)ucp->uc_mcontext.sc_gr[30]; in __makecontext() 57 ucp->uc_mcontext.sc_gr[30] = ((unsigned long) sp); in __makecontext() 60 if (ucp->uc_link) in __makecontext() 63 sp[-4 / sizeof (unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[30]; in __makecontext() 64 sp[-20 / sizeof (unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[2]; in __makecontext() 74 ucp->uc_mcontext.sc_gr[2] = (unsigned long) func; in __makecontext() 82 ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int); in __makecontext() [all …]
|
/glibc-2.36/sysdeps/unix/sysv/linux/nios2/ |
D | makecontext.c | 40 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 48 ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 57 ucp->uc_mcontext.version = 2; in __makecontext() 59 ucp->uc_mcontext.regs[15] = (uintptr_t) ucp->uc_link; in __makecontext() 61 ucp->uc_mcontext.regs[23] = (uintptr_t) &__startcontext; in __makecontext() 63 ucp->uc_mcontext.regs[24] = (uintptr_t) 0; in __makecontext() 65 ucp->uc_mcontext.regs[27] = (uintptr_t) func; in __makecontext() 67 ucp->uc_mcontext.regs[28] = (uintptr_t) sp; in __makecontext() 72 ucp->uc_mcontext.regs[i + 3] = va_arg (ap, unsigned long); in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/sparc/sparc32/ |
D | makecontext.c | 50 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 57 sp = (unsigned long int *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 62 sp[i + 8] = ucp->uc_mcontext.gregs[REG_O0 + i]; in __makecontext() 66 sp[16] = (unsigned long int) ucp->uc_link; in __makecontext() 76 ucp->uc_mcontext.gregs[REG_O0 + i] = arg; in __makecontext() 83 ucp->uc_mcontext.gregs[REG_O6] = (unsigned long int) sp; in __makecontext() 85 ucp->uc_mcontext.gregs[REG_O7] = ((unsigned long int) __start_context) - 8; in __makecontext() 87 ucp->uc_mcontext.gregs[REG_PC] = (unsigned long int) func; in __makecontext() 88 ucp->uc_mcontext.gregs[REG_nPC] = ucp->uc_mcontext.gregs[REG_PC] + 4; in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/arc/ |
D | makecontext.c | 25 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 32 sp = ((unsigned long int) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ~7; in __makecontext() 34 ucp->uc_mcontext.__sp = sp; in __makecontext() 35 ucp->uc_mcontext.__fp = 0; in __makecontext() 41 ucp->uc_mcontext.__blink = (unsigned long int) &__startcontext; in __makecontext() 47 ucp->uc_mcontext.__r14 = (unsigned long int) func; in __makecontext() 48 ucp->uc_mcontext.__r15 = (unsigned long int) ucp->uc_link; in __makecontext() 50 r = &ucp->uc_mcontext.__r0; in __makecontext() 63 ucp->uc_mcontext.__sp = sp; in __makecontext()
|
/glibc-2.36/stdlib/ |
D | tst-makecontext-align.c | 140 static ucontext_t ucp; variable 153 makecontext (&ucp, (void *) callback_0, 0); in invoke_callback_0() 154 if (setcontext (&ucp) != 0) in invoke_callback_0() 171 makecontext (&ucp, (void *) callback_1, 1, 101); in invoke_callback_1() 172 if (setcontext (&ucp) != 0) in invoke_callback_1() 190 makecontext (&ucp, (void *) callback_2, 2, 201, 202); in invoke_callback_2() 191 if (setcontext (&ucp) != 0) in invoke_callback_2() 210 makecontext (&ucp, (void *) callback_3, 3, 301, 302, 303); in invoke_callback_3() 211 if (setcontext (&ucp) != 0) in invoke_callback_3() 224 if (getcontext (&ucp) != 0) in do_test() [all …]
|
D | tst-makecontext2.c | 25 ucontext_t ucp, ucp2; variable 48 if (getcontext (&ucp) != 0) in do_test() 59 ucp.uc_link = &ucp2; in do_test() 60 ucp.uc_stack.ss_sp = st1; in do_test() 61 ucp.uc_stack.ss_size = sizeof (st1) - j; in do_test() 63 makecontext (&ucp, (void (*) (void)) cf, 2, 78, 274); in do_test() 64 if (swapcontext (&ucp2, &ucp) != 0) in do_test()
|
D | tst-makecontext.c | 27 ucontext_t ucp; variable 85 if (getcontext (&ucp) != 0) in do_test() 97 ucp.uc_link = NULL; in do_test() 98 ucp.uc_stack.ss_sp = st1; in do_test() 99 ucp.uc_stack.ss_size = sizeof st1; in do_test() 100 makecontext (&ucp, (void (*) (void)) cf, 1, somevar - 2); in do_test() 101 if (setcontext (&ucp) != 0) in do_test()
|
D | tst-swapcontext1.c | 34 func4(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) in func4() argument 37 if (swapcontext(uocp, ucp) == -1) in func4() 44 func3(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) in func3() argument 47 func4(uocp, ucp, str, fmt); in func3()
|
D | setcontext.c | 22 setcontext (const ucontext_t *ucp) in setcontext() argument
|
D | getcontext.c | 22 getcontext (ucontext_t *ucp) in getcontext() argument
|
/glibc-2.36/sysdeps/unix/sysv/linux/s390/s390-32/ |
D | makecontext.c | 52 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 58 sp = (unsigned long int *) (((unsigned long int) ucp->uc_stack.ss_sp in __makecontext() 59 + ucp->uc_stack.ss_size) & -8L); in __makecontext() 62 ucp->uc_mcontext.gregs[14] = (long int) __makecontext_ret; in __makecontext() 67 ucp->uc_mcontext.gregs[2 + i] = va_arg (ap, long int); in __makecontext() 83 ucp->uc_mcontext.gregs[7] = (long int) func; in __makecontext() 86 ucp->uc_mcontext.gregs[8] = (long int) ucp->uc_link; in __makecontext() 89 ucp->uc_mcontext.gregs[9] = (long int) &setcontext; in __makecontext() 92 ucp->uc_mcontext.gregs[15] = (long int) sp; in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/s390/s390-64/ |
D | makecontext.c | 52 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 58 sp = (unsigned long int *) (((unsigned long int) ucp->uc_stack.ss_sp in __makecontext() 59 + ucp->uc_stack.ss_size) & -8L); in __makecontext() 62 ucp->uc_mcontext.gregs[14] = (long int) __makecontext_ret; in __makecontext() 67 ucp->uc_mcontext.gregs[2 + i] = va_arg (ap, long int); in __makecontext() 83 ucp->uc_mcontext.gregs[7] = (long int) func; in __makecontext() 86 ucp->uc_mcontext.gregs[8] = (long int) ucp->uc_link; in __makecontext() 89 ucp->uc_mcontext.gregs[9] = (long int) &setcontext; in __makecontext() 92 ucp->uc_mcontext.gregs[15] = (long int) sp; in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/or1k/ |
D | makecontext.c | 40 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 48 ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 57 ucp->uc_mcontext.__gprs[14] = (uintptr_t) ucp->uc_link; in __makecontext() 59 ucp->uc_mcontext.__gprs[9] = (uintptr_t) &__startcontext; in __makecontext() 61 ucp->uc_mcontext.__gprs[2] = (uintptr_t) 0; in __makecontext() 63 ucp->uc_mcontext.__gprs[11] = (uintptr_t) func; in __makecontext() 65 ucp->uc_mcontext.__gprs[1] = (uintptr_t) sp; in __makecontext() 70 ucp->uc_mcontext.__gprs[i + 3] = va_arg (ap, unsigned long int); in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/aarch64/ |
D | makecontext.c | 42 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 50 ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 58 ucp->uc_mcontext.regs[19] = (uintptr_t) ucp->uc_link; in __makecontext() 59 ucp->uc_mcontext.sp = (uintptr_t) sp; in __makecontext() 60 ucp->uc_mcontext.pc = (uintptr_t) func; in __makecontext() 61 ucp->uc_mcontext.regs[29] = (uintptr_t) 0; in __makecontext() 62 ucp->uc_mcontext.regs[30] = (uintptr_t) &__startcontext; in __makecontext() 67 ucp->uc_mcontext.regs[i] = va_arg (ap, uint64_t); in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/arm/ |
D | makecontext.c | 27 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 37 funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 54 ucp->uc_mcontext.arm_sp = (unsigned long) funcstack; in __makecontext() 55 ucp->uc_mcontext.arm_pc = (unsigned long) func; in __makecontext() 58 ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link; in __makecontext() 59 ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext; in __makecontext() 62 regptr = &(ucp->uc_mcontext.arm_r0); in __makecontext()
|
/glibc-2.36/sysdeps/unix/sysv/linux/csky/ |
D | makecontext.c | 28 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 38 funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext() 55 ucp->uc_mcontext.__gregs.__usp = (unsigned long) funcstack; in __makecontext() 56 ucp->uc_mcontext.__gregs.__pc = (unsigned long) func; in __makecontext() 59 ucp->uc_mcontext.__gregs.__regs[5] = (unsigned long) ucp->uc_link; in __makecontext() 60 ucp->uc_mcontext.__gregs.__lr = (unsigned long) __startcontext; in __makecontext() 63 regptr = &(ucp->uc_mcontext.__gregs.__a0); in __makecontext()
|
/glibc-2.36/sysdeps/powerpc/powerpc64/ |
D | tst-ucontext-ppc64-vscr.c | 46 ucontext_t ucp; in do_test() local 74 if (getcontext (&ucp)) in do_test() 78 if (ucp.uc_mcontext.v_regs->vscr.vscr_word != vscr_word) in do_test()
|
/glibc-2.36/sysdeps/unix/sysv/linux/ia64/ |
D | makecontext.c | 40 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) in __makecontext() argument 42 mcontext_t *sc = &ucp->uc_mcontext; in __makecontext() 71 PUSH((long) ucp->uc_link); in __makecontext()
|
D | swapcontext.c | 30 __swapcontext (ucontext_t *oucp, const ucontext_t *ucp) in __swapcontext() argument 34 __setcontext (ucp); in __swapcontext()
|
/glibc-2.36/manual/ |
D | setjmp.texi | 285 @deftypefun int getcontext (ucontext_t *@var{ucp}) 287 @safety{@prelim{}@mtsafe{@mtsrace{:ucp}}@assafe{}@acsafe{}} 292 @var{ucp} with the context of the calling thread. The context contains 299 @code{uc_stack} field of @var{ucp}, or it may instead be in 318 @deftypefun void makecontext (ucontext_t *@var{ucp}, void (*@var{func}) (void), int @var{argc}, @do… 320 @safety{@prelim{}@mtsafe{@mtsrace{:ucp}}@assafe{}@acsafe{}} 323 The @var{ucp} parameter passed to @code{makecontext} shall be 331 element of the @var{ucp} structure should be initialized. The 336 The @code{uc_link} element of the object pointed to by @var{ucp} should 365 @deftypefun int setcontext (const ucontext_t *@var{ucp}) [all …]
|