aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-15 01:11:12 -0400
committerIan Moffett <ian@osmora.org>2024-03-15 01:11:12 -0400
commit2970aed680d17d33647f4b5e86fb9353561e724a (patch)
treed051b5664089314554cc76007ed4d0418a1ab8d6 /lib
parentb0a18a2f05e3c387b544f6fdf14d8fba5294437a (diff)
libc: exit: Use _Noreturn
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/include/unistd.h2
-rw-r--r--lib/libc/src/exit.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/include/unistd.h b/lib/libc/include/unistd.h
index 7158005..47cde66 100644
--- a/lib/libc/include/unistd.h
+++ b/lib/libc/include/unistd.h
@@ -34,7 +34,7 @@
extern "C" {
#endif
-__attribute__((__noreturn__)) void _exit(int status);
+_Noreturn void _exit(int status);
#if defined(__cplusplus)
}
diff --git a/lib/libc/src/exit.c b/lib/libc/src/exit.c
index 4832ac5..3b35ec6 100644
--- a/lib/libc/src/exit.c
+++ b/lib/libc/src/exit.c
@@ -29,8 +29,7 @@
#include <sys/syscall.h>
-__attribute__((__noreturn__))
-void
+_Noreturn void
_exit(int status)
{
syscall(SYS_exit, status);