summaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
Diffstat (limited to 'bits')
-rw-r--r--bits/stdio-lock.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
index b6eb98d921..d7c1db0132 100644
--- a/bits/stdio-lock.h
+++ b/bits/stdio-lock.h
@@ -1,5 +1,5 @@
/* Thread package specific definitions of stream lock type. Generic version.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,5 +45,14 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
#define _IO_cleanup_region_end(_doit) \
__libc_cleanup_region_end (_doit)
+#if defined _LIBC && !defined NOT_IN_libc
+# define _IO_acquire_lock(_fp) \
+ _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
+ _IO_flockfile (_fp)
+
+# define _IO_release_lock(_fp) \
+ _IO_funlockfile (_fp); \
+ _IO_cleanup_region_end (0)
+#endif
#endif /* bits/stdio-lock.h */