Skip to content
Commit 3ff7c04f authored by Christopher Friedt's avatar Christopher Friedt Committed by Chris Friedt
Browse files

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: default avatarChristopher Friedt <cfriedt@meta.com>
parent 689dc4a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment