summaryrefslogtreecommitdiff
path: root/src/exit
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-06 23:12:27 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-06 23:12:27 -0400
commitc8ea985748a6857ac5db9ef50f9c92e2966c04d5 (patch)
tree813479016d8106b6b7e8da8630754d8a8b1deff7 /src/exit
parentac5d085691e5a797a21ae36111aa0b274e1cf4ba (diff)
downloadmusl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.tar.gz
musl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.tar.bz2
musl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.tar.xz
musl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.zip
add _Noreturn function attribute, with fallback for pre-C11 GNUC
Diffstat (limited to 'src/exit')
-rw-r--r--src/exit/_Exit.c2
-rw-r--r--src/exit/abort.c2
-rw-r--r--src/exit/exit.c2
-rw-r--r--src/exit/quick_exit.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/exit/_Exit.c b/src/exit/_Exit.c
index 6ceb1437..c00a2ffb 100644
--- a/src/exit/_Exit.c
+++ b/src/exit/_Exit.c
@@ -1,7 +1,7 @@
#include <stdlib.h>
#include "syscall.h"
-void _Exit(int ec)
+_Noreturn void _Exit(int ec)
{
__syscall(SYS_exit_group, ec);
__syscall(SYS_exit, ec);
diff --git a/src/exit/abort.c b/src/exit/abort.c
index c5b9e526..203dd35c 100644
--- a/src/exit/abort.c
+++ b/src/exit/abort.c
@@ -2,7 +2,7 @@
#include <signal.h>
#include "syscall.h"
-void abort(void)
+_Noreturn void abort(void)
{
raise(SIGABRT);
raise(SIGKILL);
diff --git a/src/exit/exit.c b/src/exit/exit.c
index e4aeaf15..e4932b5b 100644
--- a/src/exit/exit.c
+++ b/src/exit/exit.c
@@ -14,7 +14,7 @@ weak_alias(dummy, __funcs_on_exit);
weak_alias(dummy, __flush_on_exit);
weak_alias(dummy, __seek_on_exit);
-void exit(int code)
+_Noreturn void exit(int code)
{
static int lock;
diff --git a/src/exit/quick_exit.c b/src/exit/quick_exit.c
index 18d5288a..1175d80c 100644
--- a/src/exit/quick_exit.c
+++ b/src/exit/quick_exit.c
@@ -6,7 +6,7 @@
static void dummy() { }
weak_alias(dummy, __funcs_on_quick_exit);
-void quick_exit(int code)
+_Noreturn void quick_exit(int code)
{
static int lock;
while (a_swap(&lock, 1)) __syscall(SYS_pause);