Browse Source

add some function attributes

master
Lephenixnoir 8 months ago
parent
commit
d261db447b
Signed by: Lephenixnoir GPG Key ID: 1BBA026E13FC0495
  1. 2
      include/setjmp.h
  2. 3
      include/stdlib.h

2
include/setjmp.h

@ -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__*/

3
include/stdlib.h

@ -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. */

Loading…
Cancel
Save