diff options
author | hboehm <hboehm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-15 01:04:08 +0000 |
---|---|---|
committer | hboehm <hboehm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-15 01:04:08 +0000 |
commit | 0f5a9301e49f938b030f7bf22e3c3d2319a58936 (patch) | |
tree | 8a261cf216a113001d3cf5b6a34e913b55d44e86 /libjava/java | |
parent | 1f8bd639642c732b3726d6f2f06f3ec688e55b29 (diff) | |
download | ppe42-gcc-0f5a9301e49f938b030f7bf22e3c3d2319a58936.tar.gz ppe42-gcc-0f5a9301e49f938b030f7bf22e3c3d2319a58936.zip |
* java/lang/natObject.cc (JV_SYNC_HASH): replace signed % by &.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natObject.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc index e9c74fdb285..24faf29e51e 100644 --- a/libjava/java/lang/natObject.cc +++ b/libjava/java/lang/natObject.cc @@ -351,7 +351,7 @@ struct heavy_lock { obj_addr_t address; // Object to which this lock corresponds. // Should not be traced by GC. // Cleared as heavy_lock is destroyed. - // Together with the rest of the hevy lock + // Together with the rest of the heavy lock // chain, this is protected by the lock // bit in the hash table entry to which // the chain is attached. @@ -457,12 +457,12 @@ struct hash_entry { }; #ifndef JV_SYNC_TABLE_SZ -# define JV_SYNC_TABLE_SZ 2048 +# define JV_SYNC_TABLE_SZ 2048 // Must be power of 2. #endif hash_entry light_locks[JV_SYNC_TABLE_SZ]; -#define JV_SYNC_HASH(p) (((long)p ^ ((long)p >> 10)) % JV_SYNC_TABLE_SZ) +#define JV_SYNC_HASH(p) (((long)p ^ ((long)p >> 10)) & (JV_SYNC_TABLE_SZ-1)) // Note that the light_locks table is scanned conservatively by the // collector. It is essential the the heavy_locks field is scanned. |