]> sourceware.org Git - glibc.git/commitdiff
* sysdeps/unix/closedir.c: Outside libc don't use locking.
authorUlrich Drepper <drepper@redhat.com>
Mon, 19 Feb 2007 05:44:33 +0000 (05:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 19 Feb 2007 05:44:33 +0000 (05:44 +0000)
* sysdeps/unix/opendir.c: Likewise.
* sysdeps/unix/readdir.c: Likewise.

ChangeLog
nptl/sysdeps/pthread/pthread-functions.h
sysdeps/unix/closedir.c
sysdeps/unix/opendir.c
sysdeps/unix/readdir.c

index be2556b4f275839594fddf77ec5a95a46df61427..5ef26ee8a9b81ed12c57c8bb10127154097e47c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/closedir.c: Outside libc don't use locking.
+       * sysdeps/unix/opendir.c: Likewise.
+       * sysdeps/unix/readdir.c: Likewise.
+
        [BZ #2211]
        * stdio-common/vfscanf.c: Handle localized digits etc for floating
        point numbers.
index f8c1e92371cc3d21e88455a2b721dfcaf8d18436..ff1e6e9c49d77b0e196b5bc98a9623b9d244aa5b 100644 (file)
@@ -97,16 +97,22 @@ struct pthread_functions
   void (*ptr__nptl_deallocate_tsd) (void);
   int (*ptr__nptl_setxid) (struct xid_command *);
   void (*ptr_freeres) (void);
+  void (*ptr_wait_lookup_done) (int);
 };
 
 /* Variable in libc.so.  */
 extern struct pthread_functions __libc_pthread_functions attribute_hidden;
 extern int __libc_pthread_functions_init attribute_hidden;
 
-#define PTHFCT_CALL(fct, params) \
+#ifdef PTR_DEMANGLE
+# define PTHFCT_CALL(fct, params) \
+  __libc_pthread_functions.fct params
+#else
+# define PTHFCT_CALL(fct, params) \
   ({ __typeof (__libc_pthread_functions.fct) __p;                            \
      __p = __libc_pthread_functions.fct;                                     \
      PTR_DEMANGLE (__p);                                                     \
      __p params; })
+#endif
 
 #endif /* pthread-functions.h */
index 09deee7e85ca471c51b4a3fc966891d8998380c2..3d65e14f61dc715a6fe3dd640cdab57557d1fbb6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1993,1995,1996,1998,2002,2003
+/* Copyright (C) 1991,1993,1995,1996,1998,2002,2003, 2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -45,7 +45,9 @@ __closedir (DIR *dirp)
 
   fd = dirp->fd;
 
+#ifndef NOT_IN_libc
   __libc_lock_fini (dirp->lock);
+#endif
 
   free ((void *) dirp);
 
index 6aa738fb6913a644df02f7ef64a0d098dbf2adc4..59772cda753cf68f4ce910f5978a71a9c01c2fe7 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1996,98,2000-2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1996,98,2000-2003,2005,2007
+   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
@@ -173,7 +174,9 @@ __alloc_dir (int fd, bool close_fd, const struct stat64 *statp)
   dirp->allocation = allocation;
   dirp->fd = fd;
 
+#ifndef NOT_IN_libc
   __libc_lock_init (dirp->lock);
+#endif
 
   return dirp;
 }
index 4a0f0890e9f764d50f85869e9465ca260c9f16cd..13e5e9a0213fcf37d5f289483439bff701a9708a 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,99,2000,02
-       Free Software Foundation, Inc.
+/* Copyright (C) 1991-1997,1999,2000,2002,2007 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
@@ -42,7 +41,9 @@ __READDIR (DIR *dirp)
   DIRENT_TYPE *dp;
   int saved_errno = errno;
 
+#ifndef NOT_IN_libc
   __libc_lock_lock (dirp->lock);
+#endif
 
   do
     {
@@ -110,7 +111,9 @@ __READDIR (DIR *dirp)
       /* Skip deleted files.  */
     } while (dp->d_ino == 0);
 
+#ifndef NOT_IN_libc
   __libc_lock_unlock (dirp->lock);
+#endif
 
   return dp;
 }
This page took 0.054361 seconds and 5 git commands to generate.