diff options
author | Bryce McKinlay <bryce@waitaki.otago.ac.nz> | 2002-03-10 03:53:16 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2002-03-10 03:53:16 +0000 |
commit | 4559716751fbd3424466237af54537ed96a428c3 (patch) | |
tree | 5162d3a3b9e4a79ea677ef38bb70205ec3da794b /libjava/include | |
parent | 828c1ddcccb797869894695f4bb37a6f7c43baa8 (diff) | |
download | gcc-4559716751fbd3424466237af54537ed96a428c3.zip gcc-4559716751fbd3424466237af54537ed96a428c3.tar.gz gcc-4559716751fbd3424466237af54537ed96a428c3.tar.bz2 |
Hashtable synchronization for PowerPC.
libjava:
Hashtable synchronization for PowerPC.
* configure.in: Define SLOW_PTHREAD_SELF if configure.host set
slow_pthread_self. Set up symlink for sysdeps directory.
* configure: Rebuild.
* configure.host: Document more shell variables. Set sysdeps_dir
for most platforms. Set slow_pthread_self for i686. Set
enable_hash_synchronization_default and slow_pthread_self for PowerPC.
* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use release_set so
that memory barrier is emitted where required.
* prims.cc: 64-bit align static primitive class instances.
* include/posix-threads.h (_Jv_ThreadSelf for SLOW_PTHREAD_SELF): Add
read_barrier() to enforce ordering of reads.
* sysdep/powerpc/locks.h: New file. Implementation of synchronization
primitives for PowerPC.
* sysdep/i386/locks.h: New file. Synchronization primitives for i386
moved from natObject.cc.
* sysdep/alpha/locks.h: Likewise.
* sysdep/ia64/locks.h: Likewise.
* sysdep/generic/locks.h: Likewise.
* java/lang/natObject.cc: Move thread synchronization primitives to
system-dependent headers.
gcc/java:
* decl.c (java_init_decl_processing): Make sure class_type_node
alignment is not less than 64 bits if hash synchronization isenabled.
boehm-gc:
* include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ
support is enabled, for hash synchronization.
From-SVN: r50523
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/posix-threads.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libjava/include/posix-threads.h b/libjava/include/posix-threads.h index a268f1d..79961c2 100644 --- a/libjava/include/posix-threads.h +++ b/libjava/include/posix-threads.h @@ -221,14 +221,6 @@ _Jv_ThreadCurrent (void) // to threads. -#ifdef __i386__ - -#define SLOW_PTHREAD_SELF - // Add a cache for pthread_self() if we don't have the thread - // pointer in a register. - -#endif /* __i386__ */ - #ifdef __ia64__ typedef size_t _Jv_ThreadId_t; @@ -270,6 +262,8 @@ _Jv_ThreadSelf (void) #if defined(SLOW_PTHREAD_SELF) +#include "sysdep/locks.h" + typedef pthread_t _Jv_ThreadId_t; // E.g. on X86 Linux, pthread_self() is too slow for our purpose. @@ -321,7 +315,7 @@ _Jv_ThreadSelf (void) unsigned h = SC_INDEX(sp); volatile self_cache_entry *sce = _Jv_self_cache + h; pthread_t candidate_self = sce -> self; // Read must precede following one. - // Read barrier goes here, if needed. + read_barrier(); if (sce -> high_sp_bits == sp >> LOG_THREAD_SPACING) { // The sce -> self value we read must be valid. An intervening |