mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
Merge branch 'jdk7' of oss.readytalk.com:/var/local/git/avian into jdk7
This commit is contained in:
commit
577df3cb04
@ -2739,12 +2739,15 @@ Avian_sun_misc_Unsafe_park
|
|||||||
if (time <= 0) {
|
if (time <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (time) {
|
||||||
time /= 1000 * 1000;
|
// if not absolute, interpret time as nanoseconds, but make sure
|
||||||
|
// it doesn't become zero when we convert to milliseconds, since
|
||||||
|
// zero is interpreted as infinity below
|
||||||
|
time = (time / (1000 * 1000)) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
monitorAcquire(t, local::interruptLock(t, t->javaThread));
|
monitorAcquire(t, local::interruptLock(t, t->javaThread));
|
||||||
while (time > 0
|
while (time >= 0
|
||||||
and (not (threadUnparked(t, t->javaThread)
|
and (not (threadUnparked(t, t->javaThread)
|
||||||
or monitorWait
|
or monitorWait
|
||||||
(t, local::interruptLock(t, t->javaThread), time))))
|
(t, local::interruptLock(t, t->javaThread), time))))
|
||||||
@ -2752,6 +2755,10 @@ Avian_sun_misc_Unsafe_park
|
|||||||
int64_t now = t->m->system->now();
|
int64_t now = t->m->system->now();
|
||||||
time -= now - then;
|
time -= now - then;
|
||||||
then = now;
|
then = now;
|
||||||
|
|
||||||
|
if (time == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
threadUnparked(t, t->javaThread) = false;
|
threadUnparked(t, t->javaThread) = false;
|
||||||
monitorRelease(t, local::interruptLock(t, t->javaThread));
|
monitorRelease(t, local::interruptLock(t, t->javaThread));
|
||||||
|
Loading…
Reference in New Issue
Block a user