diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-20 09:33:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-20 09:33:33 +0000 |
commit | 1561bf636d195795688e81b19fd42cdc2f5e6975 (patch) | |
tree | ba2047a599d3518e6710d3c82d68c360eacef540 /include/libio.h | |
parent | 676fde70c8940888bed31881ec9d0fd5c34f9dc0 (diff) | |
download | glibc-1561bf636d195795688e81b19fd42cdc2f5e6975.tar.gz glibc-1561bf636d195795688e81b19fd42cdc2f5e6975.tar.xz glibc-1561bf636d195795688e81b19fd42cdc2f5e6975.zip |
Update.
* include/libio.h [_IO_MTSAFE_IO && _IO_lock_inexpensive]: Redefine _IO_flockifle and _IO_funlockfile as inlines.
Diffstat (limited to 'include/libio.h')
-rw-r--r-- | include/libio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/libio.h b/include/libio.h index ee727e262f..633ee51bb7 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 |