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.
This commit is contained in:
Rich Felker committed 2018-09-12 18:40:35 -04:00
1 parent 09e87db555
commit 5f12ffe123
25 files changed
+32 -17

No files matched your search

+1 -1
View File
@@ -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];
+1
View File
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include "libc.h"
#include "lock.h"
#define COUNT 32
+1
View File
@@ -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