[lug] Linux threads programming

Carlos Hernandez chernan at datsi.fi.upm.es
Mon Jan 13 05:32:56 MST 2003


Hi all,

We hope someone can give us a hint or redirect us to the right place.

We want to be able to rollback the state of a single thread in a
multithread program under Linux (Debian Woody 2.4.20)

What we're doing  is : create a process with a few threads (each thread
has a stack size of 10K),  periodically save the stack of one of them in
a file. Eventually,  that thread exits, then we create another one  and
try to recover the state saved in the file.

We're using sigsetjmp and siglongjmp functions. We are able to save the
stack of the thread, but when we try to recover, the program aborts.
Obviusly we're touching in prohibited place.

The example is attached in case someone want to have a look.

Any hints or comments are appreciate.

Thanks a lot.

Carlos





-------------- next part --------------
A non-text attachment was scrubbed...
Name: recovery.c++
Type: text/x-c++src
Size: 3394 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20030113/75ba9c47/attachment.c>


More information about the LUG mailing list