nuttx/sched/pthread
Gregory Nutt 64b398f4c6 sched/pthread/pthread_condwait.c: Fix cancellation bug.
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
2020-04-05 22:37:24 +01:00
..
Make.defs
pthread_cancel.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
pthread_cleanup.c
pthread_completejoin.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_condbroadcast.c
pthread_condsignal.c
pthread_condtimedwait.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_condwait.c sched/pthread/pthread_condwait.c: Fix cancellation bug. 2020-04-05 22:37:24 +01:00
pthread_create.c tools/nxstyle.c: Add automatic detection of line width based on examining 2020-01-12 13:07:54 -03:00
pthread_detach.c Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
pthread_exit.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_findjoininfo.c Fix typos in comments and documentation. 2020-03-16 20:01:11 -06:00
pthread_get_stackaddr_np.c
pthread_get_stacksize_np.c
pthread_getaffinity.c
pthread_getschedparam.c
pthread_getspecific.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_initialize.c Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
pthread_join.c Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
pthread_keycreate.c
pthread_keydelete.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_kill.c
pthread_mutex.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
pthread_mutexconsistent.c
pthread_mutexdestroy.c Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
pthread_mutexinconsistent.c Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
pthread_mutexinit.c
pthread_mutextimedlock.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
pthread_mutextrylock.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
pthread_mutexunlock.c
pthread_release.c Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
pthread_setaffinity.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_setschedparam.c
pthread_setschedprio.c
pthread_setspecific.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pthread_sigmask.c
pthread.h