Commit 2a8d0cdd authored by Robert Schmidt's avatar Robert Schmidt

wait_on_condition(): if lock on mutex fails, show why

parent 56990c0f
......@@ -1667,8 +1667,10 @@ static inline void wait_sync(char *thread_name) {
}
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
int rc;
if ((rc = pthread_mutex_lock(mutex)) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s due to error %s\n",
name, strerror(rc));
exit_fun("nothing to add");
return(-1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment