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/scanf.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/scanf.c')
-rw-r--r-- | libc/stdio/scanf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index 0bb6c0f4d..13254a50b 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -235,8 +235,12 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap) #ifdef __UCLIBC_HAS_THREADS__ f.__user_locking = 1; /* Set user locking. */ +#ifdef __UCLIBC_HAS_FUTEXES__ + _IO_lock_init (f._lock); +#else __stdio_init_mutex(&f.__lock); #endif +#endif f.__nextopen = NULL; /* Set these last since __bufgetc initialization depends on @@ -282,8 +286,12 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap) #ifdef __UCLIBC_HAS_THREADS__ f.f.__user_locking = 1; /* Set user locking. */ +#ifdef __UCLIBC_HAS_FUTEXES__ + _IO_lock_init (f.f._lock); +#else __stdio_init_mutex(&f.f.__lock); #endif +#endif f.f.__nextopen = NULL; return vfscanf(&f.f, fmt, ap); @@ -413,8 +421,12 @@ int vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict format, #ifdef __UCLIBC_HAS_THREADS__ f.__user_locking = 1; /* Set user locking. */ +#ifdef __UCLIBC_HAS_FUTEXES__ + _IO_lock_init (f._lock); +#else __stdio_init_mutex(&f.__lock); #endif +#endif f.__nextopen = NULL; return vfwscanf(&f, format, arg); |