From 3d7ec3ad7571c11871d0b8b7426730831ac53d1a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 31 Aug 2003 20:32:41 +0000 Subject: [PATCH] Update. 2003-08-31 Ulrich Drepper * libio/libio.h (_IO_acquire_lock_fct): Define as inline function. Code by Richard Henderson. --- ChangeLog | 5 +++++ libio/libio.h | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0b78e5e..5596d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-08-31 Ulrich Drepper + + * libio/libio.h (_IO_acquire_lock_fct): Define as inline function. + Code by Richard Henderson. + 2003-08-31 Philip Blundell * sysdeps/unix/sysv/linux/arm/Versions: Add posix_fadvise64 and diff --git a/libio/libio.h b/libio/libio.h index 11274ae..af74793 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -516,6 +516,14 @@ extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t) __THROW; extern void _IO_free_wbackup_area (_IO_FILE *) __THROW; #endif +static inline void +_IO_acquire_lock_fct (_IO_FILE **p) +{ + _IO_FILE *fp = *p; + if ((fp->_flags & _IO_USER_LOCK) == 0) + _IO_funlockfile (fp); +} + #ifdef __cplusplus } #endif -- 2.7.4