1 /* Test of correct simulation for uc->uc_link in a signal handler. */
8 static void sighandler(int sig
, siginfo_t
*sip
, void *arg
)
12 /* Current uc_link value has to be equal to (ucontext_t *) arg. */
14 assert(uc2
.uc_link
== arg
);
22 /* Current uc_link value has to be NULL. */
23 if (getcontext(&uc
)) {
29 sa
.sa_sigaction
= sighandler
;
30 sa
.sa_flags
= SA_SIGINFO
;
31 if (sigfillset(&sa
.sa_mask
)) {
35 if (sigaction(SIGUSR1
, &sa
, NULL
)) {
42 /* Current uc_link value has to be NULL. */