summaryrefslogtreecommitdiffstats
path: root/libc/stdio/_stdio.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-08-09 05:50:49 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-08-09 05:50:49 +0000
commit75f9a2b1874f3c50727c6b91fd5b5735a2a5deb3 (patch)
tree04a04dac7fd6a10c123dea261b22e7e331d33dd2 /libc/stdio/_stdio.c
parent7eca0902fd7bbdb04ea83f967b0a198335c8d5db (diff)
downloaduClibc-alpine-75f9a2b1874f3c50727c6b91fd5b5735a2a5deb3.tar.bz2
uClibc-alpine-75f9a2b1874f3c50727c6b91fd5b5735a2a5deb3.tar.xz
In reality, the futex support that was originally added was only for STDIO operations internal to libc. The futexes should not be visible to anything other than libc. These changes clean up futex and STDIO.
Diffstat (limited to 'libc/stdio/_stdio.c')
-rw-r--r--libc/stdio/_stdio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/stdio/_stdio.c b/libc/stdio/_stdio.c
index 671f1e14c..b21beb728 100644
--- a/libc/stdio/_stdio.c
+++ b/libc/stdio/_stdio.c
@@ -73,7 +73,7 @@
#endif
#ifdef __UCLIBC_HAS_THREADS__
-#ifdef __UCLIBC_HAS_FUTEXES__
+#ifdef __USE_STDIO_FUTEXES__
#define __STDIO_FILE_INIT_THREADSAFE \
2, _LIBC_LOCK_RECURSIVE_INITIALIZER,
#else
@@ -156,8 +156,8 @@ FILE *__stdout = _stdio_streams + 1; /* For putchar() macro. */
FILE *_stdio_openlist = _stdio_streams;
# ifdef __UCLIBC_HAS_THREADS__
-# ifdef __UCLIBC_HAS_FUTEXES__
-# include <bits/stdio-lock.h>
+# ifdef __USE_STDIO_FUTEXES__
+# include <bits/stdio-lock.h>
_IO_lock_t _stdio_openlist_lock = _IO_lock_initializer;
# else
pthread_mutex_t _stdio_openlist_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
@@ -172,7 +172,7 @@ int _stdio_openlist_delflag = 0;
/* 2 if threading not initialized and 0 otherwise; */
int _stdio_user_locking = 2;
-#ifndef __UCLIBC_HAS_FUTEXES__
+#ifndef __USE_STDIO_FUTEXES__
void __stdio_init_mutex(pthread_mutex_t *m)
{
static const pthread_mutex_t __stdio_mutex_initializer
@@ -196,7 +196,7 @@ void _stdio_term(void)
* locked, then I suppose there is a chance that a pointer in the
* chain might be corrupt due to a partial store.
*/
-#ifdef __UCLIBC_HAS_FUTEXES__
+#ifdef __USE_STDIO_FUTEXES__
_IO_lock_init (_stdio_openlist_lock);
#else
__stdio_init_mutex(&_stdio_openlist_lock);
@@ -221,7 +221,7 @@ void _stdio_term(void)
}
ptr->__user_locking = 1; /* Set locking mode to "by caller". */
-#ifdef __UCLIBC_HAS_FUTEXES__
+#ifdef __USE_STDIO_FUTEXES__
_IO_lock_init (ptr->_lock);
#else
__stdio_init_mutex(&ptr->__lock); /* Shouldn't be necessary, but... */