aboutsummaryrefslogtreecommitdiff
path: root/bits/stdio-lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'bits/stdio-lock.h')
-rw-r--r--bits/stdio-lock.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
index 225ccd8..f7c6108 100644
--- a/bits/stdio-lock.h
+++ b/bits/stdio-lock.h
@@ -22,12 +22,17 @@
#include <bits/libc-lock.h>
-__libc_lock_define (typedef, _IO_lock_t)
+__libc_lock_define_recursive (typedef, _IO_lock_t)
/* We need recursive (counting) mutexes. */
#define _IO_lock_initializer ...
#error libio needs recursive mutexes for _IO_MTSAFE_IO
+#define _IO_lock_init(_name) __libc_lock_init_recursive (_name)
+#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name)
+#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name)
+#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name)
+
#define _IO_cleanup_region_start(_fct, _fp) \
__libc_cleanup_region_start (_fct, _fp)
@@ -35,14 +40,6 @@ __libc_lock_define (typedef, _IO_lock_t)
__libc_cleanup_region_start (_fct, NULL)
#define _IO_cleanup_region_end(_doit) \
__libc_cleanup_region_end (_doit)
-#define _IO_lock_init(_name) \
- __libc_lock_init_recursive (_name)
-#define _IO_lock_fini(_name) \
- __libc_lock_fini_recursive (_name)
-#define _IO_lock_lock(_name) \
- __libc_lock_lock (_name)
-#define _IO_lock_unlock(_name) \
- __libc_lock_unlock (_name)
#endif /* bits/stdio-lock.h */