You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/04/05 21:01:16 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #736: sched/pthread/pthread_condwait.c: Fix cancellation bug.

patacongo opened a new pull request #736: sched/pthread/pthread_condwait.c:  Fix cancellation bug.
URL: https://github.com/apache/incubator-nuttx/pull/736
 
 
   Now that nxsem_wait_uninterruptible() returns an error when the thread is canceled, new logic is being executed.  This revealed an existing error in pthread_cond_wait().  The nature of the error is as follows:
   
   * pthread_cond_wait() must atomically (1) release the mutex, (2) wait on the condition, and (3) re-establish the mutex.  Errors can occur on any of these steps.  In this case the ECANCELED error was (very correctly) reported by nxsem_wait_uninterruptible().
   
   * However, logic in step (3) had a bug; it re-acquired the mutex, but then a bug in existing logic cause the mutex to be improperly initialized.  Essentially, the wrong error status value was being testing.  This resulted in a nonsequitar and errors reported by the OS test.
   
   This problem was found by apps/testing/ostest/pthread_cleanup.c

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 merged pull request #736: sched/pthread/pthread_condwait.c: Fix cancellation bug.

Posted by GitBox <gi...@apache.org>.
Ouss4 merged pull request #736: sched/pthread/pthread_condwait.c:  Fix cancellation bug.
URL: https://github.com/apache/incubator-nuttx/pull/736
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services