Print detailed info why mutex locking failed
This commit is contained in:
+16
-11
@@ -994,9 +994,10 @@ static inline void wait_sync(char *thread_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
||||||
|
int rc;
|
||||||
if (pthread_mutex_lock(mutex) != 0) {
|
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||||
LOG_E( PHY, "error locking mutex for %s\n",name);
|
LOG_E(PHY, "wakeup_thread(): error locking mutex for %s (%d %s, %p)\n",
|
||||||
|
name, rc, strerror(rc), (void *)mutex);
|
||||||
exit_fun("nothing to add");
|
exit_fun("nothing to add");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
@@ -1013,8 +1014,10 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int
|
|||||||
}
|
}
|
||||||
|
|
||||||
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] wait_on_condition(): error locking mutex for %s (%d %s, %p)\n",
|
||||||
|
name, rc, strerror(rc), (void *)mutex);
|
||||||
exit_fun("nothing to add");
|
exit_fun("nothing to add");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
@@ -1034,9 +1037,10 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
||||||
|
int rc;
|
||||||
if (pthread_mutex_lock(mutex) != 0) {
|
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||||
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
|
LOG_E(PHY, "[SCHED][eNB] wait_on_busy_condition(): error locking mutex for %s (%d %s, %p)\n",
|
||||||
|
name, rc, strerror(rc), (void *)mutex);
|
||||||
exit_fun("nothing to add");
|
exit_fun("nothing to add");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
@@ -1056,9 +1060,10 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
|
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
|
||||||
|
int rc;
|
||||||
if (pthread_mutex_lock(mutex) != 0) {
|
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||||
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
|
LOG_E(PHY, "[SCHED][eNB] release_thread(): error locking mutex for %s (%d %s, %p)\n",
|
||||||
|
name, rc, strerror(rc), (void *)mutex);
|
||||||
exit_fun("nothing to add");
|
exit_fun("nothing to add");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user