add some function attributes

This commit is contained in:
Lephenixnoir 2021-05-30 08:59:06 +02:00
parent cd7fe7a329
commit d261db447b
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 5 additions and 0 deletions

View File

@ -9,12 +9,14 @@
typedef struct __jmp_buf jmp_buf[1];
/* Save the calling environment in __env (not the signal mask), return 0. */
__attribute__((returns_twice))
extern int setjmp(jmp_buf __env);
/* Standard requires setjmp to be a macro (7.13§1) */
#define setjmp setjmp
/* Restore the calling environment from __env, return __val to setjmp. */
__attribute__((noreturn))
extern void longjmp(jmp_buf __env, int __val);
#endif /*__SETJMP_H__*/

View File

@ -31,12 +31,15 @@ extern void free(void *__ptr);
/* Communication with the environment. */
/* Abort execution; raises SIGABRT and leaves quickly with _Exit(). */
__attribute__((noreturn))
void abort(void);
/* Exit; calls handlers, flushes and closes streams and temporary files. */
__attribute__((noreturn))
void exit(int __status);
/* Exit immediately, bypassing exit handlers or signal handlers. */
__attribute__((noreturn))
void _Exit(int __status);
/* Integer arithmetic functions. */