Because eventDescrp->mutex is a non-recursive lock attempting to
acquire the lock with pthread_mutex_lock can cause the system to hang
indefinitely if the lock was already previously aquired with the
preceeding call to pthread_mutex_trylock.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>


[ROCm/ROCR-Runtime commit: a97b7df4b9]
Этот коммит содержится в:
Sunday Clement
2025-05-29 14:52:48 -04:00
коммит произвёл Yat Sin, David
родитель 6de1c81b71
Коммит 25886ecda8
+4 -1
Просмотреть файл
@@ -577,7 +577,10 @@ int WaitForOsEvent(EventHandle event, unsigned int milli_seconds) {
}
int ret_code = 0;
pthread_mutex_lock(&eventDescrp->mutex);
if(milli_seconds != 0) {
pthread_mutex_lock(&eventDescrp->mutex);
}
if (!eventDescrp->state) {
if (milli_seconds == 0) {
ret_code = 1;