]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 20 Dec 2002 09:33:33 +0000 (09:33 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 20 Dec 2002 09:33:33 +0000 (09:33 +0000)
* include/libio.h [_IO_MTSAFE_IO && _IO_lock_inexpensive]:
Redefine _IO_flockifle and _IO_funlockfile as inlines.

ChangeLog
include/libio.h
nptl/ChangeLog
nptl/sysdeps/pthread/bits/stdio-lock.h

index 6cbb3498eb0156a0e65dce35901b2c4c52f74bb3..227655be5f79ac33afe217fa87152df637bba74c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
 
+       * include/libio.h [_IO_MTSAFE_IO && _IO_lock_inexpensive]:
+       Redefine _IO_flockifle and _IO_funlockfile as inlines.
+
        * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): For TLS
        builds add "tls" in the search path.
        * elf/ldconfig.c (is_hwcap_platform): Also recognize "tls".
index ee727e262f794c8087839946964b8c89dff5c7cc..633ee51bb7f856eb0f6376032ada1cbe52e5bbaa 100644 (file)
@@ -10,4 +10,15 @@ libc_hidden_proto (__woverflow)
 libc_hidden_proto (__wunderflow)
 libc_hidden_proto (__wuflow)
 
+#if defined _IO_MTSAFE_IO && _IO_lock_inexpensive
+# undef _IO_flockfile
+# define _IO_flockfile(_fp) \
+  if (((_fp)->_flags & _IO_USER_LOCK) == 0)                                  \
+     _IO_lock_lock (*(_fp)->_lock)
+# undef _IO_funlockfile
+# define _IO_funlockfile(_fp) \
+  if (((_fp)->_flags & _IO_USER_LOCK) == 0)                                  \
+    _IO_lock_unlock (*(_fp)->_lock)
+#endif
+
 #endif
index ed7de444250c61b7fae52cd4362b6bc056f75ba4..1cb4c372c252a0302de769db5c42cba78e0e98e5 100644 (file)
@@ -1,3 +1,7 @@
+2002-12-20  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
+
 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
index ea622e41422bf6272e57666032b0d95651f172d0..fbb14a1120a9f05623c551d3634539e8050652aa 100644 (file)
@@ -24,6 +24,9 @@
 #include <lowlevellock.h>
 
 
+/* The locking here is very inexpensive, even for inlining.  */
+#define _IO_lock_inexpensive   1
+
 typedef struct { int lock; int cnt; void *owner; } _IO_lock_t;
 
 #define _IO_lock_initializer { LLL_MUTEX_LOCK_INITIALIZER, 0, NULL }