DCE for the HP e3000 (B3821-90003)
Chapter 5 47
Programming with Kernel Threads
Writing Threaded Applications
task.
• Using setjmp and longjmp — Do not use calls to setjmp and
longjmp, these routines save and restore the signal mask and could
inadvertently cause a signal that another thread is waiting on to be
masked. Instead, use _setjmp and _longjmp; these routines do not
manipulate the signal mask.
When executing _longjmp be aware of the following:
— Ensure you are returning to a state saved within the context of
the same thread.
— If you _longjmp over a TRY clause, an exception could try to
_longjmp to a stack frame that no longer exists; and vice versa.
— Do not _longjmp out of a signal handler.