aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-06 11:49:42 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-06 11:49:42 +0000
commitd3c9f895257e50335e874ca08ad6efcc0abea6d7 (patch)
tree2609eac2bef305ae9e69f0f3e458882030cd83dc /sysdeps
parentd5ddad4ff48cc7887281259dacf5ac455d5a9dd8 (diff)
downloadglibc-d3c9f895257e50335e874ca08ad6efcc0abea6d7.tar
glibc-d3c9f895257e50335e874ca08ad6efcc0abea6d7.tar.gz
glibc-d3c9f895257e50335e874ca08ad6efcc0abea6d7.tar.bz2
glibc-d3c9f895257e50335e874ca08ad6efcc0abea6d7.zip
Update.
2002-12-06 Ulrich Drepper <drepper@redhat.com> * misc/syslog.c (log_cleanup): New function. (openlog): Use log_cleanup instead of __libc_mutex_unlock. (closelog): Likewise. * elf/dl-close.c: Use __rtld_lock_* macros instead of __libc_lock_*. * elf/dl-iteratephdr.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-misc.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-support.c: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/bits/libc-lock.h: Define __rtld_lock_* macros. * sysdeps/mach/bits/libc-lock.h: Likewise. * sysdeps/mach/hurd/bits/libc-lock.h: Likewise. * dirent/bug-readdir1.c (main): Don't call closedir, just close
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bits/libc-lock.h4
-rw-r--r--sysdeps/generic/ldsodefs.h2
-rw-r--r--sysdeps/mach/bits/libc-lock.h9
-rw-r--r--sysdeps/mach/hurd/bits/libc-lock.h20
4 files changed, 32 insertions, 3 deletions
diff --git a/sysdeps/generic/bits/libc-lock.h b/sysdeps/generic/bits/libc-lock.h
index ff808904a8..c2bb494940 100644
--- a/sysdeps/generic/bits/libc-lock.h
+++ b/sysdeps/generic/bits/libc-lock.h
@@ -30,6 +30,7 @@
of libc. */
#define __libc_lock_define(CLASS,NAME)
#define __libc_lock_define_recursive(CLASS,NAME)
+#define __rtld_lock_define_recursive(CLASS,NAME)
#define __libc_rwlock_define(CLASS,NAME)
/* Define an initialized lock variable NAME with storage class CLASS. */
@@ -47,6 +48,7 @@
/* Same as last but this time we initialize a recursive mutex. */
#define __libc_lock_init_recursive(NAME)
+#define __rtld_lock_init_recursive(NAME)
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
@@ -64,6 +66,7 @@
/* Lock the recursive named lock variable. */
#define __libc_lock_lock_recursive(NAME)
+#define __rtld_lock_lock_recursive(NAME)
/* Try to lock the named lock variable. */
#define __libc_lock_trylock(NAME) 0
@@ -79,6 +82,7 @@
/* Unlock the recursive named lock variable. */
#define __libc_lock_unlock_recursive(NAME)
+#define __rtld_lock_unlock_recursive(NAME)
/* Define once control variable. */
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 5e08844ce3..a704644d6e 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -250,7 +250,7 @@ struct rtld_global
This must be a recursive lock since the initializer function of
the loaded object might as well require a call to this function.
At this time it is not anymore a problem to modify the tables. */
- __libc_lock_define_recursive (EXTERN, _dl_load_lock)
+ __rtld_lock_define_recursive (EXTERN, _dl_load_lock)
/* OS version. */
EXTERN unsigned int _dl_osversion;
diff --git a/sysdeps/mach/bits/libc-lock.h b/sysdeps/mach/bits/libc-lock.h
index 2484297c8a..76bbd02d0d 100644
--- a/sysdeps/mach/bits/libc-lock.h
+++ b/sysdeps/mach/bits/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Mach cthreads version.
- Copyright (C) 1996,97,98,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1996,97,98,2000,01, 2002 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
@@ -134,4 +134,11 @@ void *__libc_getspecific (__libc_key_t key);
#define __libc_lock_unlock_recursive __libc_lock_unlock
#define __libc_lock_lock_recursive __libc_lock_lock
+#define __rtld_lock_define_initialized_recursive __libc_lock_define_initialized
+#define __rtld_lock_init_recursive __libc_lock_init
+#define __rtld_lock_fini_recursive __libc_lock_fini
+#define __rtld_lock_trylock_recursive __libc_lock_trylock
+#define __rtld_lock_unlock_recursive __libc_lock_unlock
+#define __rtld_lock_lock_recursive __libc_lock_lock
+
#endif /* bits/libc-lock.h */
diff --git a/sysdeps/mach/hurd/bits/libc-lock.h b/sysdeps/mach/hurd/bits/libc-lock.h
index 6e3835371c..bc83eafc49 100644
--- a/sysdeps/mach/hurd/bits/libc-lock.h
+++ b/sysdeps/mach/hurd/bits/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Hurd version using Mach cthreads.
- Copyright (C) 1996,97,98,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1996,97,98,2000,01, 2002 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
@@ -62,6 +62,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
called on a lock variable before the containing storage is reused. */
#define __libc_lock_fini(NAME) __mutex_unlock (&(NAME))
#define __libc_lock_fini_recursive(NAME) __mutex_unlock (&(NAME).mutex)
+#define __rtld_lock_fini_recursive(NAME) __mutex_unlock (&(NAME).mutex)
/* Lock the named lock variable. */
@@ -80,6 +81,13 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
#define __libc_lock_define_initialized_recursive(CLASS,NAME) \
CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
+#define __rtld_lock_define_recursive(CLASS,NAME) \
+ __libc_lock_define_recursive (CLASS, NAME)
+#define _RTLD_LOCK_RECURSIVE_INITIALIZER \
+ _LIBC_LOCK_RECURSIVE_INITIALIZER
+#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \
+ __libc_lock_define_initialized_recursive (CLASS, NAME)
+
#define __libc_lock_init_recursive(NAME) \
({ __libc_lock_recursive_t *const __lock = &(NAME); \
__lock->owner = 0; mutex_init (&__lock->mutex); })
@@ -111,6 +119,16 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
})
+#define __rtld_lock_init_recursive(NAME) \
+ __libc_lock_init_recursive (NAME)
+#define __rtld_lock_trylock_recursive(NAME) \
+ __libc_lock_trylock_recursive (NAME)
+#define __rtld_lock_lock_recursive(NAME) \
+ __libc_lock_lock_recursive(NAME)
+#define __rtld_lock_unlock_recursive(NAME) \
+ __libc_lock_unlock_recursive (NAME)
+
+
/* XXX for now */
#define __libc_rwlock_define __libc_lock_define
#define __libc_rwlock_define_initialized __libc_lock_define_initialized