Commit 466b0add authored by Ian Craggs's avatar Ian Craggs

Debugging

parent db037c2d
...@@ -97,6 +97,8 @@ mutex_type Thread_create_mutex() ...@@ -97,6 +97,8 @@ mutex_type Thread_create_mutex()
} }
extern mutex_type mqttasync_mutex;
extern mutex_type mqttcommand_mutex;
/** /**
* Lock a mutex which has already been created, block until ready * Lock a mutex which has already been created, block until ready
* @param mutex the mutex * @param mutex the mutex
...@@ -113,6 +115,10 @@ int Thread_lock_mutex(mutex_type mutex) ...@@ -113,6 +115,10 @@ int Thread_lock_mutex(mutex_type mutex)
if (mutex->__data.__owner != 0) if (mutex->__data.__owner != 0)
{ {
printf("mutex owner != 0\n"); printf("mutex owner != 0\n");
if (mutex == mqttasync_mutex)
printf("mutex is mqttasync mutex\n");
if (mutex == mqttcommand_mutex)
printf("mutex is mqttasync mutex\n");
StackTrace_printStack(stdout); StackTrace_printStack(stdout);
} }
if ((rc = pthread_mutex_lock(mutex)) == 0) if ((rc = pthread_mutex_lock(mutex)) == 0)
......
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