change an initial value of pid variable of mutex structure to -1
The pid variable of mutex structure is initialized to 0 at mutex_init function.
PID 0 means Idle task. Due to this, when we use mutex at idle task,
mutex returns deadlock error.
@@ -128,7 +128,7 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR const pthread_mutexattr_t
/* Indicate that the semaphore is not held by any thread. */
- mutex->pid = 0;
+ mutex->pid = -1;
/* Initialize the mutex like a semaphore with initial count = 1 */
