From 1561bf636d195795688e81b19fd42cdc2f5e6975 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Dec 2002 09:33:33 +0000 Subject: Update. * include/libio.h [_IO_MTSAFE_IO && _IO_lock_inexpensive]: Redefine _IO_flockifle and _IO_funlockfile as inlines. --- include/libio.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/libio.h b/include/libio.h index ee727e2..633ee51 100644 --- a/include/libio.h +++ b/include/libio.h @@ -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 -- cgit v1.1