]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
libio: Assume _IO_lock_inexpensive
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 10 May 2021 21:05:49 +0000 (18:05 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 4 Jun 2021 12:54:52 +0000 (09:54 -0300)
It is already set by both Linux and Hurd.

libio/libio.h
sysdeps/mach/libc-lock.h
sysdeps/nptl/stdio-lock.h

index 98d526dec775b3701c2541d8d0f3a942ba9d9b34..cebdc6576356e87b4b0a7ab256ac8e680b545544 100644 (file)
@@ -280,17 +280,10 @@ libc_hidden_proto (_IO_sgetn)
 # undef _IO_ftrylockfile
 
 # define _IO_peekc(_fp) _IO_peekc_locked (_fp)
-# if _IO_lock_inexpensive
-#  define _IO_flockfile(_fp) \
+# define _IO_flockfile(_fp) \
   if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_lock_lock (*(_fp)->_lock)
-#  define _IO_funlockfile(_fp) \
+# define _IO_funlockfile(_fp) \
   if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_lock_unlock (*(_fp)->_lock)
-# else
-#  define _IO_flockfile(_fp) \
-  if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_flockfile (_fp)
-#  define _IO_funlockfile(_fp) \
-  if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_funlockfile (_fp)
-# endif
 #endif /* _IO_MTSAFE_IO */
 
 #endif /* _LIBIO_H */
index d713f34b5fb59eecd854ca648826fe01f9e017af..220fcee921f14eb3308ad7dd55774a52b44b4f44 100644 (file)
@@ -24,9 +24,6 @@
 #include <tls.h>
 #include <lowlevellock.h>
 
-/* The locking here is very inexpensive, even for inlining.  */
-#define _IO_lock_inexpensive   1
-
 typedef unsigned int __libc_lock_t;
 typedef struct
 {
index f2eee49816d67c2206d26021838b4d5c93ea2756..a4f419b5163da5a3239842fb66db99fa115055c2 100644 (file)
@@ -23,9 +23,6 @@
 #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_t_defined 1