about summary refs log tree commit diff
path: root/src/exit
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-12 10:19:54 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 18:40:35 -0400
commit5f12ffe1239a5e4f8d4e98e2dff4e191a71f4693 (patch)
tree39d2397a4c158aa45e26538b0798fe2e23e0d431 /src/exit
parent09e87db555045bf3bcef69c692df24d13b2856fe (diff)
downloadmusl-5f12ffe1239a5e4f8d4e98e2dff4e191a71f4693.tar.gz
musl-5f12ffe1239a5e4f8d4e98e2dff4e191a71f4693.tar.xz
musl-5f12ffe1239a5e4f8d4e98e2dff4e191a71f4693.zip
split internal lock API out of libc.h, creating lock.h
this further reduces the number of source files which need to include
libc.h and thereby be potentially exposed to libc global state and
internals.

this will also facilitate further improvements like adding an inline
fast-path, if we want to do so later.
Diffstat (limited to 'src/exit')
-rw-r--r--src/exit/abort.c2
-rw-r--r--src/exit/at_quick_exit.c1
-rw-r--r--src/exit/atexit.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/exit/abort.c b/src/exit/abort.c
index 7c323d26..e1980f10 100644
--- a/src/exit/abort.c
+++ b/src/exit/abort.c
@@ -3,7 +3,7 @@
 #include "syscall.h"
 #include "pthread_impl.h"
 #include "atomic.h"
-#include "libc.h"
+#include "lock.h"
 #include "ksigaction.h"
 
 hidden volatile int __abort_lock[1];
diff --git a/src/exit/at_quick_exit.c b/src/exit/at_quick_exit.c
index 4079b242..d3ce6522 100644
--- a/src/exit/at_quick_exit.c
+++ b/src/exit/at_quick_exit.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include "libc.h"
+#include "lock.h"
 
 #define COUNT 32
 
diff --git a/src/exit/atexit.c b/src/exit/atexit.c
index cd3b0a64..160d277a 100644
--- a/src/exit/atexit.c
+++ b/src/exit/atexit.c
@@ -1,6 +1,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include "libc.h"
+#include "lock.h"
 
 /* Ensure that at least 32 atexit handlers can be registered without malloc */
 #define COUNT 32