diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-22 05:47:17 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-22 05:47:17 +0000 |
commit | 9a97faafbcd7bc23d5adf32f4ed135bdf623629a (patch) | |
tree | d20e2fba0f9fce0ae5f30490d01e61da3725dcc6 /libc/stdio/_fopen.c | |
parent | eb6ed4fe445d1d604a6deab019d547f78540127e (diff) | |
download | uClibc-alpine-9a97faafbcd7bc23d5adf32f4ed135bdf623629a.tar.bz2 uClibc-alpine-9a97faafbcd7bc23d5adf32f4ed135bdf623629a.tar.xz |
Add futex support into uClibc. Selection of futex support independent of
NPTL is not currently supported.
Diffstat (limited to 'libc/stdio/_fopen.c')
-rw-r--r-- | libc/stdio/_fopen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/stdio/_fopen.c b/libc/stdio/_fopen.c index f7f5bb626..b1722fef2 100644 --- a/libc/stdio/_fopen.c +++ b/libc/stdio/_fopen.c @@ -98,8 +98,12 @@ FILE *_stdio_fopen(intptr_t fname_or_mode, #ifdef __UCLIBC_HAS_THREADS__ /* We only initialize the mutex in the non-freopen case. */ /* stream->__user_locking = _stdio_user_locking; */ +#ifdef __UCLIBC_HAS_FUTEXES__ + _IO_lock_init (stream->_lock); +#else __stdio_init_mutex(&stream->__lock); #endif +#endif } #ifdef __UCLIBC_MJN3_ONLY__ @@ -190,8 +194,12 @@ FILE *_stdio_fopen(intptr_t fname_or_mode, #ifdef __UCLIBC_HAS_THREADS__ /* Even in the freopen case, we reset the user locking flag. */ stream->__user_locking = _stdio_user_locking; +#ifdef __UCLIBC_HAS_FUTEXES__ + /* _IO_lock_init (stream->_lock); */ +#else /* __stdio_init_mutex(&stream->__lock); */ #endif +#endif #ifdef __STDIO_HAS_OPENLIST __STDIO_THREADLOCK_OPENLIST; |