diff options
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 4 | ||||
-rw-r--r-- | linuxthreads/sysdeps/pthread/bits/libc-lock.h | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 4b4de6a250..c89ef1e515 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,7 @@ +1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit. + 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de> * attr.c: Correct typo. diff --git a/linuxthreads/sysdeps/pthread/bits/libc-lock.h b/linuxthreads/sysdeps/pthread/bits/libc-lock.h index 530d48c6da..ed64cbfa0f 100644 --- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h +++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h @@ -1,5 +1,5 @@ /* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -119,13 +119,14 @@ typedef pthread_key_t __libc_key_t; /* Start critical region with cleanup. */ #define __libc_cleanup_region_start(FCT, ARG) \ { struct _pthread_cleanup_buffer _buffer; \ - if (_pthread_cleanup_push_defer != NULL) { \ + int _avail = _pthread_cleanup_push_defer != NULL; \ + if (_avail) { \ _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ } /* End critical region with cleanup. */ #define __libc_cleanup_region_end(DOIT) \ - if (_pthread_cleanup_push_defer != NULL) { \ + if (_avail) { \ _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ } \ } |