This is the structure of ucontext_t
:
typedef struct ucontext_t
{
unsigned long int __ctx(uc_flags);
struct ucontext_t *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
sigset_t uc_sigmask;
struct _libc_fpstate __fpregs_mem;
__extension__ unsigned long long int __ssp[4];
} ucontext_t;
I know uc_sigmask
specifies the signals to be blocked after a setcontext
. But how is it implemented? Is it atomic to set sigmask
and set up registers and jmp to to the target rip
?