1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* include/libio.h [_IO_MTSAFE_IO && _IO_lock_inexpensive]:
	Redefine _IO_flockifle and _IO_funlockfile as inlines.
This commit is contained in:
Ulrich Drepper
2002-12-20 09:33:33 +00:00
parent 676fde70c8
commit 1561bf636d
4 changed files with 21 additions and 0 deletions

View 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