summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-08-31 20:32:41 +0000
committerUlrich Drepper <drepper@redhat.com>2003-08-31 20:32:41 +0000
commit3d7ec3ad7571c11871d0b8b7426730831ac53d1a (patch)
tree284bedddec5bdb3a8acf2602b75619c6e52e7450 /libio
parent28c97261ea0b6570b6c92222f5a8676a012bdf21 (diff)
downloadglibc-3d7ec3ad7571c11871d0b8b7426730831ac53d1a.tar.gz
glibc-3d7ec3ad7571c11871d0b8b7426730831ac53d1a.tar.xz
glibc-3d7ec3ad7571c11871d0b8b7426730831ac53d1a.zip
Update.
2003-08-31  Ulrich Drepper  <drepper@redhat.com>

	* libio/libio.h (_IO_acquire_lock_fct): Define as inline function.
	Code by Richard Henderson.
Diffstat (limited to 'libio')
-rw-r--r--libio/libio.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libio/libio.h b/libio/libio.h
index 11274aebb4..af74793369 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