From 9a97faafbcd7bc23d5adf32f4ed135bdf623629a Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Fri, 22 Jul 2005 05:47:17 +0000 Subject: Add futex support into uClibc. Selection of futex support independent of NPTL is not currently supported. --- libc/stdio/vsnprintf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libc/stdio/vsnprintf.c') diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c index ffe33ada3..2f4f8e0a4 100644 --- a/libc/stdio/vsnprintf.c +++ b/libc/stdio/vsnprintf.c @@ -41,7 +41,11 @@ int vsnprintf(char *__restrict buf, size_t size, #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; @@ -109,7 +113,11 @@ int vsnprintf(char *__restrict buf, size_t size, #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; @@ -193,7 +201,11 @@ int vsnprintf(char *__restrict buf, size_t size, #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; -- cgit v1.2.3