How to setup a handler for sigaction() ?

Joel Sherrill joel.sherrill at
Wed Apr 27 11:20:25 UTC 2011

On 04/26/2011 03:55 PM, Petr Benes wrote:
> Btw. I am using RTEMS latest version, pc386 bsp and x86_64 dual core
> processor :).
That doesn't matter.  All support like this is the same.

> On 04/26/2011 03:13 PM, Petr Benes wrote:
>> Hi all,
>> I want to ask if you happen to know how to set up a signal handler for
>> long jumps in order to get a context previously saved by sigsetjmp.
>> a) I save context by sigsetjmp()
>> b) I register a handler
>> struct sigaction sa_long_jump;
>> sa_long_jump.sa_sigaction = __long_jump_handler;
>> c) My handler in Linux used to look like this:
>> void __long_jump_handler(int s, siginfo_t *info, void *c) {
>> ...context = info->si_ptr; // this is not in rtems
>> }
>> But how about RTEMS?

Is that field in POSIX?  See and find out.
If it is, then it looks like you found the first task in your
GSoC project.   Adding that.

Otherwise, we need to figure out what to do.  :)

>> Regards
>> Petr Benes

More information about the users mailing list