@@ -45,20 +45,24 @@ threadParkImpl(J9VMThread *vmThread, BOOLEAN timeoutIsEpochRelative, I_64 timeou
45
45
J9JavaVM *vm = vmThread->javaVM ;
46
46
47
47
/* Trc_JCL_park_Entry(vmThread, timeoutIsEpochRelative, timeout); */
48
- if ((0 != timeout) || ( timeoutIsEpochRelative) ) {
48
+ if ((0 != timeout) || timeoutIsEpochRelative) {
49
49
if (timeoutIsEpochRelative) {
50
- /* Currently, the omrthread layer provides no direct support for absolute timeouts.
51
- * Simulate the timeout by calculating the delta from the current time.
52
- */
53
- PORT_ACCESS_FROM_VMC (vmThread);
54
- I_64 timeNow = j9time_current_time_millis ();
50
+ if (timeout <= 0 ) {
51
+ rc = J9THREAD_TIMED_OUT;
52
+ } else {
53
+ /* Currently, the omrthread layer provides no direct support for absolute timeouts.
54
+ * Simulate the timeout by calculating the delta from the current time.
55
+ */
56
+ PORT_ACCESS_FROM_VMC (vmThread);
57
+ I_64 timeNow = j9time_current_time_millis ();
55
58
56
- millis = timeout - timeNow;
57
- nanos = 0 ;
59
+ millis = timeout - timeNow;
60
+ nanos = 0 ;
58
61
59
- if (millis <= 0 ) {
60
- rc = J9THREAD_TIMED_OUT;
61
- /* Trc_JCL_park_timeIsInPast(vmThread, timeNow);*/
62
+ if (millis <= 0 ) {
63
+ rc = J9THREAD_TIMED_OUT;
64
+ /* Trc_JCL_park_timeIsInPast(vmThread, timeNow); */
65
+ }
62
66
}
63
67
} else {
64
68
millis = timeout / oneMillion;
0 commit comments