Commit 01d72567 authored by Robert Schmidt's avatar Robert Schmidt

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

parent 23782db0
...@@ -1667,8 +1667,10 @@ static inline void wait_sync(char *thread_name) { ...@@ -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) { 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) { int rc;
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); 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"); exit_fun("nothing to add");
return(-1); 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