summaryrefslogtreecommitdiffstats
path: root/libc/stdio/_stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/_stdio.h')
-rw-r--r--libc/stdio/_stdio.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index e3c2c5888..2b956daa3 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -25,6 +25,16 @@
#ifdef __UCLIBC_HAS_THREADS__
#include <pthread.h>
+#ifdef __UCLIBC_HAS_FUTEXES__
+#define __STDIO_THREADLOCK_OPENLIST \
+ _IO_lock_lock(_stdio_openlist_lock)
+
+#define __STDIO_THREADUNLOCK_OPENLIST \
+ _IO_lock_unlock(_stdio_openlist_lock)
+
+#define __STDIO_THREADTRYLOCK_OPENLIST \
+ _IO_lock_trylock(_stdio_openlist_lock)
+#else
#define __STDIO_THREADLOCK_OPENLIST \
__pthread_mutex_lock(&_stdio_openlist_lock)
@@ -33,6 +43,9 @@
#define __STDIO_THREADTRYLOCK_OPENLIST \
__pthread_mutex_trylock(&_stdio_openlist_lock)
+#endif
+
+
#else