projects
/
external
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7bdd9c
)
(test_loaded): Don't overwrite a value another thread might have found.
author
Ulrich Drepper
<drepper@redhat.com>
Fri, 13 Dec 2002 23:05:35 +0000
(23:05 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Fri, 13 Dec 2002 23:05:35 +0000
(23:05 +0000)
nptl/forward.c
patch
|
blob
|
history
diff --git
a/nptl/forward.c
b/nptl/forward.c
index
441a7f2
..
6c278c0
100644
(file)
--- a/
nptl/forward.c
+++ b/
nptl/forward.c
@@
-22,6
+22,7
@@
#include <stdlib.h>
#include <shlib-compat.h>
+#include <atomic.h>
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
@@
-33,7
+34,7
@@
test_loaded (void)
{
/* While we are getting the result set the handle to (void *) -1 to
avoid recursive calls. */
-
libpthread_handle = (void *) -1l
;
+
atomic_compare_and_exchange_acq (&libpthread_handle, (void *) -1l, NULL)
;
void *h = __libc_dlopen_mode ("libpthread.so.0", RTLD_LAZY | RTLD_NOLOAD);