zephyr/lib/posix
Christopher Friedt 3ff7c04f30 posix: timer: use async pthread cancellation
Previously, Zephyr's POSIX API did not differentiate between
deferred and asynchronous pthread cancellation. In fact all
pthread cancellation was asynchronous. According to the spec,
all pthreads should be created with deferred cancellation by
default.

Note: PTHREAD_CANCEL_ASYNCHRONOUS means cancel asynchronously
with respect to cancellation points (but synchronously with
respect to the thread that callse pthread_cancel(), which is
perhaps unintuitive).

The POSIX timer relied on this non-standard convention.

Oddly, this change prevents what would have otherwise been a
regression that would have been caused by fixing pthread
behaviour (in a separate commit).

We are effectively uncovering bugs which were probably always
present in the pthread.c and timer.c implementations going
back quite a few years.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-22 06:48:55 -05:00
..
getopt lib/posix getopt: Fix include 2024-01-05 11:38:57 -06:00
shell posix: shell: introduce top level posix command 2024-01-18 10:54:32 +01:00
_common.c arch: remove wait_q.h include 2023-09-12 12:55:36 -04:00
barrier.c posix: Implement pthread_barrieratter functions 2023-07-09 10:40:57 -04:00
clock.c posix: clock: add ztest rule to reset clock base 2024-01-17 05:41:37 -05:00
CMakeLists.txt posix: rwlock: make pthread_rwlock_t a pooled ipc type 2024-01-18 09:22:35 -05:00
cond.c posix: logging: use log module register instead of declare 2023-09-19 16:11:58 +01:00
eventfd.c posix: eventfd: remove redundant conditional 2023-07-21 06:33:19 -04:00
fnmatch.c lib: posix: tag the fallthrough case as __fallthrough 2023-12-30 14:35:41 -05:00
fs.c posix: fs: Fixes stat command to return file information 2023-06-23 17:04:34 -04:00
Kconfig posix: rwlock: make pthread_rwlock_t a pooled ipc type 2024-01-18 09:22:35 -05:00
Kconfig.barrier posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.clock posix kconfig: Improve depends on host libC 2024-01-05 11:38:57 -06:00
Kconfig.cond posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.eventfd lib: os: build fdtable conditionally 2023-09-28 06:25:16 -04:00
Kconfig.fnmatch posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.fs lib: os: build fdtable conditionally 2023-09-28 06:25:16 -04:00
Kconfig.getopt posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.key posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.limits posix: signal: check RTSIG limit 2023-07-18 15:35:42 -04:00
Kconfig.mqueue posix: mqueue: Remove custom default for HEAP_MEM_POOL_SIZE 2023-12-20 11:01:42 +01:00
Kconfig.mutex posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.pthread posix: pthread: support stack sizes larger than 65k 2023-12-23 22:29:41 -05:00
Kconfig.rwlock posix: rwlock: make pthread_rwlock_t a pooled ipc type 2024-01-18 09:22:35 -05:00
Kconfig.sched posix: sched: Add CONFIG_POSIX_PRIORITY_SCHEDULING 2024-01-15 09:57:44 +01:00
Kconfig.semaphore posix: semaphore: implement sem_open(), sem_unlink() & sem_close() 2024-01-10 07:18:19 -05:00
Kconfig.signal posix: pthread: implement pthread_sigmask() 2023-12-04 20:49:35 -05:00
Kconfig.spinlock posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.template.pooled_ipc_type posix: ensure that pooled ipc type is user-configurable 2023-10-13 11:13:07 -04:00
Kconfig.template.pooled_type posix: add logging to pooled resource templates 2023-09-19 06:16:10 -04:00
Kconfig.template.with_logging posix: add logging to pooled resource templates 2023-09-19 06:16:10 -04:00
Kconfig.template.with_url posix: split supported features into separate Kconfig files 2023-07-06 11:47:07 -04:00
Kconfig.timer posix: implement timer_getoverrun() 2023-07-10 09:30:33 +02:00
Kconfig.uname posix: implement uname 2023-07-09 16:57:16 -04:00
key.c posix: pthread_setspecific: fix for coverity issue cid 334906 2023-12-28 12:19:10 +00:00
mqueue.c posix: mqueue: pop mode as int with va_arg() 2024-01-01 16:36:31 -05:00
mutex.c lib: posix: mutex: to_posix_mutex should be spinlocked 2023-10-03 22:30:38 -04:00
nanosleep.c posix: implement clock_nanosleep 2023-08-30 13:02:58 -07:00
perror.c lib: posix: add perror() implementation 2022-07-04 22:53:36 +02:00
posix_clock.h posix: clock: clock_gettime() should not be a syscall 2024-01-04 08:27:29 +09:00
posix_internal.h posix: pthread: support stack sizes larger than 65k 2023-12-23 22:29:41 -05:00
pthread.c posix: pthread: use is_posix_policy_prio_valid to check POSIX priority 2024-01-18 10:54:47 +01:00
pthread_sched.h posix: sched: add support for SCHED_OTHER 2023-04-29 13:14:40 -07:00
rwlock.c posix: rwlock: make pthread_rwlock_t a pooled ipc type 2024-01-18 09:22:35 -05:00
sched.c posix: sched: Implement get APIs for scheduling parameters 2024-01-15 09:57:44 +01:00
semaphore.c posix: semaphore: optimize named semaphore implementation a bit 2024-01-10 07:18:19 -05:00
signal.c posix: signal: implement sigprocmask() 2024-01-11 07:49:26 -05:00
sleep.c lib: posix: update usleep() to follow the POSIX spec 2022-11-24 19:31:33 -05:00
spinlock.c posix: spinlock: additional kconfig for k_spinlock being size 0 2023-07-06 16:45:26 +00:00
timer.c posix: timer: use async pthread cancellation 2024-01-22 06:48:55 -05:00
uname.c posix: implement uname 2023-07-09 16:57:16 -04:00