#include <errno.h>
#include <string.h>
#include "__dirent.h"
-#include "libc.h"
+#include "lock.h"
int readdir_r(DIR *restrict dir, struct dirent *restrict buf, struct dirent **restrict result)
{
#include <dirent.h>
#include <unistd.h>
#include "__dirent.h"
-#include "libc.h"
+#include "lock.h"
void rewinddir(DIR *dir)
{
#include <dirent.h>
#include <unistd.h>
#include "__dirent.h"
-#include "libc.h"
+#include "lock.h"
void seekdir(DIR *dir, long off)
{
#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];
#include <stdlib.h>
#include "libc.h"
+#include "lock.h"
#define COUNT 32
#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
extern hidden const char __libc_version[];
-/* Designed to avoid any overhead in non-threaded processes */
-hidden void __lock(volatile int *);
-hidden void __unlock(volatile int *);
-#define LOCK(x) __lock(x)
-#define UNLOCK(x) __unlock(x)
-
hidden void __synccall(void (*)(void *), void *);
hidden int __setxid(int, int, int, int);
--- /dev/null
+#ifndef LOCK_H
+#define LOCK_H
+
+hidden void __lock(volatile int *);
+hidden void __unlock(volatile int *);
+#define LOCK(x) __lock(x)
+#define UNLOCK(x) __unlock(x)
+
+#endif
#include "locale_impl.h"
#include "atomic.h"
#include "pleval.h"
+#include "lock.h"
struct binding {
struct binding *next;
#include <sys/mman.h>
#include "locale_impl.h"
#include "libc.h"
-#include "atomic.h"
+#include "lock.h"
const char *__lctrans_impl(const char *msg, const struct __locale_map *lm)
{
#include <string.h>
#include "locale_impl.h"
#include "libc.h"
-#include "atomic.h"
+#include "lock.h"
static char buf[LC_ALL*(LOCALE_NAME_MAX+1)];
#include <stdint.h>
#include <limits.h>
#include <errno.h>
-#include "libc.h"
+#include "lock.h"
#include "malloc_impl.h"
#define ALIGN 16
#include <pthread.h>
#include <errno.h>
#include <fcntl.h>
-#include "libc.h"
+#include "lock.h"
static volatile int lock[1];
static char log_ident[32];
#include <stdlib.h>
#include <stdint.h>
-#include "libc.h"
+#include "lock.h"
/*
this code uses the same lagged fibonacci generator as the
#include "syscall.h"
#include "pthread_impl.h"
#include "libc.h"
+#include "lock.h"
#include "ksigaction.h"
volatile int dummy_lock[1] = { 0 };
#include "stdio_impl.h"
-#include "libc.h"
+#include "lock.h"
static FILE *ofl_head;
static volatile int ofl_lock[1];
#include <pthread.h>
#include "libc.h"
+#include "lock.h"
static struct atfork_funcs {
void (*prepare)(void);
#include "pthread_impl.h"
#include "stdio_impl.h"
#include "libc.h"
+#include "lock.h"
#include <sys/mman.h>
#include <string.h>
#include <stddef.h>
#include "pthread_impl.h"
+#include "lock.h"
int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param *restrict param)
{
#include "pthread_impl.h"
+#include "lock.h"
int pthread_kill(pthread_t t, int sig)
{
#include "pthread_impl.h"
+#include "lock.h"
int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param)
{
#include "pthread_impl.h"
+#include "lock.h"
int pthread_setschedprio(pthread_t t, int prio)
{
#include <sys/stat.h>
#include <stdlib.h>
#include <pthread.h>
-#include "libc.h"
+#include "lock.h"
static struct {
ino_t ino;
#include "futex.h"
#include "atomic.h"
#include "../dirent/__dirent.h"
+#include "lock.h"
static struct chain {
struct chain *next;
#include <string.h>
#include <sys/mman.h>
#include "libc.h"
+#include "lock.h"
long __timezone = 0;
int __daylight = 0;