zephyr/lib/posix
Christopher Friedt da0398d198 posix: pthread: consider PTHREAD_EXITED state in pthread_create
If a thread is joined using `pthread_join()`, then the
internal state would be set to `PTHREAD_EXITED`.

Previously, `pthread_create()` would only consider pthreads
with internal state `PTHREAD_TERMINATED` as candidates for new
threads. However, that causes a descriptor leak.

We should be able to reuse a single thread an infinite number
of times.

Here, we also consider threads with internal state
`PTHREAD_EXITED` as candiates in `pthread_create()`.

Fixes #47609

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-12 10:16:02 +02:00
..
getopt lib: add mising braces to single line if statements 2022-07-06 11:00:45 -04:00
CMakeLists.txt lib: posix: add perror() implementation 2022-07-04 22:53:36 +02:00
Kconfig lib: posix: semaphore: use consistent timebase in sem_timedwait 2022-06-24 20:12:05 +02:00
clock.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
eventfd.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
fs.c lib/posix/fs: fix end-of-dir in readdir 2022-05-13 11:10:04 -07:00
mqueue.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
nanosleep.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
perror.c lib: posix: add perror() implementation 2022-07-04 22:53:36 +02:00
pthread.c posix: pthread: consider PTHREAD_EXITED state in pthread_create 2022-07-12 10:16:02 +02:00
pthread_barrier.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_common.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_cond.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_key.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_mutex.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_rwlock.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_sched.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
semaphore.c lib: posix: semaphore: use consistent timebase in sem_timedwait 2022-06-24 20:12:05 +02:00
sleep.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
timer.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00