diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 2 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/bits/stdio-lock.h | 25 |
2 files changed, 24 insertions, 3 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 870216038b..3961b0cbcb 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -5,7 +5,7 @@ 2003-08-29 Jakub Jelinek <jakuB@redhat.com> - * tst-cancel.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add + * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add sigemptyset before sigaddset. Reported by jreiser@BitWagon.com. 2003-08-27 Ulrich Drepper <drepper@redhat.com> diff --git a/nptl/sysdeps/pthread/bits/stdio-lock.h b/nptl/sysdeps/pthread/bits/stdio-lock.h index fbb14a1120..3bc3c06314 100644 --- a/nptl/sysdeps/pthread/bits/stdio-lock.h +++ b/nptl/sysdeps/pthread/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. +/* Thread package specific definitions of stream lock type. NPTL version. + 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 @@ -85,5 +85,26 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; #define _IO_cleanup_region_end(_doit) \ __libc_cleanup_region_end (_doit) +#if defined _LIBC && !defined NOT_IN_libc + +# ifdef __EXCEPTIONS +# define _IO_acquire_lock(_fp) \ + do { \ + auto inline __attribute__((always_inline)) void \ + _IO_acquire_lock_fct (int *p __attribute__ ((__unused__))) \ + { \ + if (((_fp)->_flags & _IO_USER_LOCK) == 0) \ + _IO_funlockfile (_fp); \ + } \ + int _IO_acquire_lock_dummy \ + __attribute__ ((cleanup (_IO_acquire_lock_fct))); \ + _IO_flockfile (_fp) + +# else +# define _IO_acquire_lock(_fp) _IO_acquire_lock_needs_exceptions_enabled +# endif +# define _IO_release_lock(_fp) ; } while (0) + +#endif #endif /* bits/stdio-lock.h */ |