8029453: java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java failed by timeout

Reviewed-by: bdelsart, ddmitriev, dcubed
This commit is contained in:
David Holmes 2015-08-13 22:08:40 -04:00
parent d32b06427d
commit 6b3f9d3d1a

View File

@ -5785,9 +5785,11 @@ void Parker::unpark() {
status = pthread_mutex_unlock(_mutex);
assert(status == 0, "invariant");
} else {
// must capture correct index before unlocking
int index = _cur_index;
status = pthread_mutex_unlock(_mutex);
assert(status == 0, "invariant");
status = pthread_cond_signal(&_cond[_cur_index]);
status = pthread_cond_signal(&_cond[index]);
assert(status == 0, "invariant");
}
} else {