Index: libjava/java/lang/natObject.cc =================================================================== RCS file: /cvs/gcc/gcc/libjava/java/lang/natObject.cc,v retrieving revision 1.24 diff -u -r1.24 natObject.cc --- libjava/java/lang/natObject.cc 31 Dec 2002 17:43:47 -0000 1.24 +++ libjava/java/lang/natObject.cc 19 Feb 2003 00:40:32 -0000 @@ -353,7 +353,7 @@ 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. @@ -459,12 +459,12 @@ }; #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.