]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 28 Jan 2003 06:46:50 +0000 (06:46 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 28 Jan 2003 06:46:50 +0000 (06:46 +0000)
* stdio-common/vfprintf.c [USE_IN_LIBIO]: Use _IO_cleanup_region_start
instead of __libc_cleanup_region_start and _IO_cleanup_region_end
instead of __libc_cleanup_region_end.

* sysdeps/unix/sysv/linux/i386/system.c (CLEANUP_HANDLER): Pass 1
as first parameter to __libc_cleanup_region_start.

ChangeLog
nptl/sysdeps/pthread/bits/libc-lock.h
stdio-common/vfprintf.c
sysdeps/unix/sysv/linux/i386/system.c

index db6bcdb922be4b86eb56ef4cbe9082a6c3541f4c..021601f2f1dabb47d50759c5652792ff657d2738 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
 
+       * stdio-common/vfprintf.c [USE_IN_LIBIO]: Use _IO_cleanup_region_start
+       instead of __libc_cleanup_region_start and _IO_cleanup_region_end
+       instead of __libc_cleanup_region_end.
+
+       * sysdeps/unix/sysv/linux/i386/system.c (CLEANUP_HANDLER): Pass 1
+       as first parameter to __libc_cleanup_region_start.
+
        * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
        (__fe_nomask_env): Use __prctl not prctl.
        * sysdeps/unix/sysv/linux/syscalls.list: Add __prctl alias for
index e4b5b802ee2228f8b3aa72bd4dae24e5650c8b68..f19281e9995f21623fa471587a66c75b4c147135 100644 (file)
@@ -348,12 +348,17 @@ typedef pthread_key_t __libc_key_t;
 /* Start critical region with cleanup.  */
 #define __libc_cleanup_region_start(DOIT, FCT, ARG) \
   { struct _pthread_cleanup_buffer _buffer;                                  \
-    int _avail = PTF(_pthread_cleanup_push_defer) != NULL;                   \
-    if (_avail) {                                                            \
-      PTF(_pthread_cleanup_push_defer) (&_buffer, FCT, ARG);                 \
-    } else if (DOIT) {                                                       \
-      _buffer.__routine = (FCT);                                             \
-      _buffer.__arg = (ARG);                                                 \
+    int _avail;                                                                      \
+    if (DOIT) {                                                                      \
+      _avail = PTF(_pthread_cleanup_push_defer) != NULL;                     \
+      if (_avail) {                                                          \
+       PTF(_pthread_cleanup_push_defer) (&_buffer, FCT, ARG);                \
+      } else {                                                               \
+       _buffer.__routine = (FCT);                                            \
+       _buffer.__arg = (ARG);                                                \
+      }                                                                              \
+    } else {                                                                 \
+      _avail = 0;                                                            \
     }
 
 /* End critical region with cleanup.  */
index a5902164eee597fc0de264cf7ef501ea21238cb9..26277e2b22de4a37a9ffc32ac74908a0b5586142 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991-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
@@ -1307,7 +1307,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
 
   /* Lock stream.  */
 #ifdef USE_IN_LIBIO
-  __libc_cleanup_region_start (1, (void (*) (void *)) &_IO_funlockfile, s);
+  _IO_cleanup_region_start ((void (*) (void *)) &_IO_funlockfile, s);
   _IO_flockfile (s);
 #else
   __libc_cleanup_region_start (1, (void (*) (void *)) &__funlockfile, s);
@@ -1909,10 +1909,11 @@ all_done:
   /* Unlock the stream.  */
 #ifdef USE_IN_LIBIO
   _IO_funlockfile (s);
+  _IO_cleanup_region_end (0);
 #else
   __funlockfile (s);
-#endif
   __libc_cleanup_region_end (0);
+#endif
 
   return done;
 }
index a171541790717ab2c971ecefe35188c40bfebc9d..1e3035d7f3443e895594e0b42c727e64eda14b16 100644 (file)
@@ -40,7 +40,7 @@
 static void cancel_handler (void *arg);
 
 #define CLEANUP_HANDLER \
-  __libc_cleanup_region_start (0, cancel_handler, &pid)
+  __libc_cleanup_region_start (1, cancel_handler, &pid)
 
 #define CLEANUP_RESET \
   __libc_cleanup_region_end (0)