mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8230424: Use platform independent code for Thread.interrupt support
8231094: os::sleep in assert message should be changed to JavaThread::sleep Reviewed-by: rehn, dcubed
This commit is contained in:
parent
f94f7f2212
commit
5bca86f9f4
15 changed files with 129 additions and 155 deletions
|
@ -5063,7 +5063,7 @@ void Parker::park(bool isAbsolute, jlong time) {
|
|||
Thread* thread = Thread::current();
|
||||
assert(thread->is_Java_thread(), "Must be JavaThread");
|
||||
JavaThread *jt = (JavaThread *)thread;
|
||||
if (Thread::is_interrupted(thread, false)) {
|
||||
if (jt->is_interrupted(false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5088,7 +5088,7 @@ void Parker::park(bool isAbsolute, jlong time) {
|
|||
|
||||
// Don't wait if cannot get lock since interference arises from
|
||||
// unblocking. Also. check interrupt before trying wait
|
||||
if (Thread::is_interrupted(thread, false) ||
|
||||
if (jt->is_interrupted(false) ||
|
||||
os::Solaris::mutex_trylock(_mutex) != 0) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue