rocr: Fix Potential Deadlock

Moved the Call to pthread_mutex_lock to an else statement for better
code readibility.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
此提交包含在:
Sunday Clement authored and Yat Sin, David committed 2025-06-04 10:18:09 -04:00
1 父節點 a97b7df4b9
當前提交 1635746a9c
1 file changed
+2 -3
+2 -3
查看文件
@@ -574,12 +574,11 @@ int WaitForOsEvent(EventHandle event, unsigned int milli_seconds) {
// Timeout
return 1;
}
} else {
pthread_mutex_lock(&eventDescrp->mutex);
}
int ret_code = 0;
if(milli_seconds != 0) {
pthread_mutex_lock(&eventDescrp->mutex);
}
if (!eventDescrp->state) {
if (milli_seconds == 0) {