diff --git a/libc/include/setjmp.h b/libc/include/setjmp.h index 195f2515a..67d3c2f66 100644 --- a/libc/include/setjmp.h +++ b/libc/include/setjmp.h @@ -65,18 +65,18 @@ typedef long jmp_buf[_JBLEN]; __BEGIN_DECLS -int _setjmp(jmp_buf __env); -void _longjmp(jmp_buf __env, int __value); +int _setjmp(jmp_buf __env) __returns_twice; +__noreturn void _longjmp(jmp_buf __env, int __value); -int setjmp(jmp_buf __env); -void longjmp(jmp_buf __env, int __value); +int setjmp(jmp_buf __env) __returns_twice; +__noreturn void longjmp(jmp_buf __env, int __value); #define setjmp(__env) setjmp(__env) -int sigsetjmp(sigjmp_buf __env, int __save_signal_mask) - __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12); -void siglongjmp(sigjmp_buf __env, int __value) - __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12); +int sigsetjmp(sigjmp_buf __env, int __save_signal_mask) __returns_twice __INTRODUCED_IN_ARM(9) + __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12); +__noreturn void siglongjmp(sigjmp_buf __env, int __value) __INTRODUCED_IN_ARM(9) + __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12); __END_DECLS diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index a919a7922..ca9374e2c 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -86,6 +86,7 @@ #define __noreturn __attribute__((__noreturn__)) #define __mallocfunc __attribute__((__malloc__)) #define __packed __attribute__((__packed__)) +#define __returns_twice __attribute__((__returns_twice__)) #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) diff --git a/libc/include/unistd.h b/libc/include/unistd.h index 90173aa29..9000407c3 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -78,7 +78,7 @@ extern char** environ; __noreturn void _exit(int __status); pid_t fork(void); -pid_t vfork(void); +pid_t vfork(void) __returns_twice; pid_t getpid(void); pid_t gettid(void) __attribute_const__; pid_t getpgid(pid_t __pid);