summaryrefslogtreecommitdiff
path: root/libjava/posix-threads.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r--libjava/posix-threads.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc
index f068fbab53d..6442eaffb2f 100644
--- a/libjava/posix-threads.cc
+++ b/libjava/posix-threads.cc
@@ -438,19 +438,17 @@ _Jv_ThreadWait (void)
#if defined(SLOW_PTHREAD_SELF)
-// Support for pthread_self() lookup cache.
+#include "sysdep/locks.h"
+// Support for pthread_self() lookup cache.
volatile self_cache_entry _Jv_self_cache[SELF_CACHE_SIZE];
-
_Jv_ThreadId_t
_Jv_ThreadSelf_out_of_line(volatile self_cache_entry *sce, size_t high_sp_bits)
{
pthread_t self = pthread_self();
- // The ordering between the following writes matters.
- // On Alpha, we probably need a memory barrier in the middle.
sce -> high_sp_bits = high_sp_bits;
- sce -> self = self;
+ release_set ((obj_addr_t *) &(sce -> self), self);
return self;
}