getcontext(3) Library Functions Manual getcontext(3) getcontext, setcontext - (libc -lc) #include int getcontext(ucontext_t *ucp); int setcontext(const ucontext_t *ucp); System V mcontext_t ucontext_t getcontext() setcontext() makecontext(3) swapcontext(3) . mcontext_t . ucontext_t : typedef struct ucontext_t { struct ucontext_t *uc_link; sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; ... } ucontext_t; sigset_t stack_t . uc_link ( makecontext(3)) uc_sigmask ( sigprocmask(2)) uc_stack ( sigaltstack(2)) uc_mcontext . getcontext() ucp . setcontext() ucp. . getcontext() makecontext(3) ( SA_SIGINFO sigaction(2)). getcontext() . makecontext(3) func makecontext(3). func uc_link ucp makecontext(3). NULL . " ". SUSv2 " ". getcontext() 0 setcontext() . -1 errno . . attributes(7). +----------------------+------------------------------------+----------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+----------------------------------------------------------------------------------------+ |getcontext() | | (MT-Safe) :ucp | |setcontext() | | | +----------------------+------------------------------------+----------------------------------------------------------------------------------------+ . SUSv2 POSIX.1-2001. POSIX.1-2008 POSIX . setjmp(3)/ longjmp(3). sigsetjmp(3)/ siglongjmp(3). . getcontext() setcontext(). . . longjmp(3): . siglongjmp(3) setcontext() . sigaction(2) sigaltstack(2) sigprocmask(2) longjmp(3) makecontext(3) sigsetjmp(3) signal(7) 3 . . : . 6.18 8 2026 getcontext(3)