qinwei2004 commented on code in PR #7597:
URL: https://github.com/apache/incubator-nuttx/pull/7597#discussion_r1023407887


##########
sched/pthread/pthread_mutexunlock.c:
##########
@@ -142,15 +142,15 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex)
        * thread owns the semaphore.
        */
 
-      if (mutex->pid != (int)getpid())
+      if (mutex->pid != (int)gettid())
 
 #elif defined(CONFIG_PTHREAD_MUTEX_UNSAFE) && 
defined(CONFIG_PTHREAD_MUTEX_TYPES)
       /* If mutex types are not supported, then all mutexes are NORMAL (or
        * DEFAULT).  Error checking should never be performed for the
        * non-robust NORMAL mutex type.
        */
 
-      if (mutex->type != PTHREAD_MUTEX_NORMAL && mutex->pid != (int)getpid())
+      if (mutex->type != PTHREAD_MUTEX_NORMAL && mutex->pid != (int)gettid())

Review Comment:
   OK 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to