diff options
Diffstat (limited to 'libc/sysdeps/linux/m68k/bits/setjmp.h')
-rw-r--r-- | libc/sysdeps/linux/m68k/bits/setjmp.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/m68k/bits/setjmp.h b/libc/sysdeps/linux/m68k/bits/setjmp.h index aa376a092..31a241380 100644 --- a/libc/sysdeps/linux/m68k/bits/setjmp.h +++ b/libc/sysdeps/linux/m68k/bits/setjmp.h @@ -44,3 +44,14 @@ typedef struct containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf)->__sp) + +/* Simple version of sigsetjmp and siglongjmp */ + +#define __sigsetjmp(env, savesigs) ((env)->__mask_was_saved = (savesigs), \ + sigprocmask(SIG_SETMASK, 0, &(env)->__saved_mask), \ + setjmp(&(env)->__jmpbuf)) + +#define siglongjmp(env, val) (((env)->__mask_was_saved ? \ + sigprocmask(SIG_SETMASK, &(env)->__saved_mask, 0) : 0), \ + longjmp(&(env)->__jmpbuf, val)) + |