Changeset 1391 for branches/GNU/src/gcc/libjava/java/lang/natObject.cc
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libjava/java/lang/natObject.cc (modified) (11 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/java/lang/natObject.cc
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 1 // natObject.cc - Implementation of the Object class. 2 2 3 /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation3 /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation 4 4 5 5 This file is part of libgcj. … … 10 10 11 11 #include <config.h> 12 12 13 13 14 #include <string.h> … … 308 309 #include <limits.h> 309 310 #include <unistd.h> // for usleep, sysconf. 310 #include <sched.h> // for sched_yield.311 311 #include <gcj/javaprims.h> 312 312 #include <sysdep/locks.h> 313 313 314 314 315 // Try to determine whether we are on a multiprocessor, i.e. whether … … 528 529 else if (n < yield_limit) 529 530 { 530 sched_yield();531 ield(); 531 532 } 532 533 else … … 534 535 unsigned duration = MIN_SLEEP_USECS << (n - yield_limit); 535 536 if (n >= 15 + yield_limit || duration > MAX_SLEEP_USECS) 536 duration = MAX_SLEEP_USECS;537 usleep(duration);537 duration = MAX_SLEEP_USECS; 538 usleep(duration); 538 539 } 539 540 } … … 577 578 { 578 579 heavy_lock *hl = (heavy_lock *)cd; 580 581 582 583 584 585 586 579 587 obj_addr_t addr = (obj_addr_t)obj; 588 580 589 hash_entry *he = light_locks + JV_SYNC_HASH(addr); 581 590 obj_addr_t he_address = (he -> address & ~LOCKED); … … 756 765 _Jv_MonitorEnter (jobject obj) 757 766 { 767 768 769 758 770 obj_addr_t addr = (obj_addr_t)obj; 771 759 772 obj_addr_t address; 760 773 unsigned hash = JV_SYNC_HASH(addr); … … 901 914 _Jv_MonitorExit (jobject obj) 902 915 { 916 917 918 903 919 obj_addr_t addr = (obj_addr_t)obj; 920 904 921 _Jv_ThreadId_t self = _Jv_ThreadSelf(); 905 922 unsigned hash = JV_SYNC_HASH(addr); … … 1081 1098 java::lang::Object::wait (jlong timeout, jint nanos) 1082 1099 { 1100 1101 1102 1083 1103 obj_addr_t addr = (obj_addr_t)this; 1104 1084 1105 _Jv_ThreadId_t self = _Jv_ThreadSelf(); 1085 1106 unsigned hash = JV_SYNC_HASH(addr); … … 1158 1179 java::lang::Object::notify (void) 1159 1180 { 1181 1182 1183 1160 1184 obj_addr_t addr = (obj_addr_t)this; 1185 1161 1186 _Jv_ThreadId_t self = _Jv_ThreadSelf(); 1162 1187 unsigned hash = JV_SYNC_HASH(addr); … … 1203 1228 java::lang::Object::notifyAll (void) 1204 1229 { 1230 1231 1232 1205 1233 obj_addr_t addr = (obj_addr_t)this; 1234 1206 1235 _Jv_ThreadId_t self = _Jv_ThreadSelf(); 1207 1236 unsigned hash = JV_SYNC_HASH(addr); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
