if (context == NULL)
return FOSA_EINVAL;
- sigsetjmp(*context, 1);
+ context->setjmp_retvalue = sigsetjmp(context->setjmp_context, 1);
return 0;
}
int fosa_long_jump_was_performed(const fosa_long_jump_context_t *context,
int *jumped)
{
- return FOSA_EINVAL;
+ if (context == NULL)
+ return FOSA_EINVAL;
+
+ *jumped = context->setjmp_retvalue != 0;
+
+ return 0;
}
/**
fosa_long_jump_context_t *context =
(fosa_long_jump_context_t*) info->si_ptr;
- siglongjmp(*context, 1);
+ siglongjmp(context->setjmp_context, -1);
}
/**
int ret;
struct sigaction sa_long_jump;
+ signal = FOSA_LONG_JUMP_SIGNAL;
sa_long_jump.sa_handler = NULL;
sa_long_jump.sa_sigaction = __long_jump_handler;
sigemptyset(&sa_long_jump.sa_mask);