[PATCH v4 0/3] NPTL synchronization fixes
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Jul 31 15:00:44 GMT 2025
It seems that this issues has triggered another problem [2], and
although I could not reproduce it I still think the current pthread
does have the synchronization issue.
Changes from v1:
* Remove THREAD_STATE_EXITING check on pthread_cancel, pthread_kill
already handles this case.
* Removed INVALID_TD_P macro in favor or using the new joinstate.
Adhemerval Zanella (3):
nptl: Set cancellation type and state on pthread_exit (BZ #28267)
nptl: Do not use pthread set_tid_address as state synchronization (BZ
#19951)
nptl: Remove INVALID_TD_P
nptl/Makefile | 1 +
nptl/descr.h | 26 +++---
nptl/nptl-stack.h | 2 +-
nptl/pthread_cancel.c | 3 +-
nptl/pthread_clockjoin.c | 2 +-
nptl/pthread_create.c | 42 +++++++--
nptl/pthread_detach.c | 40 ++++----
nptl/pthread_getattr_np.c | 2 +-
nptl/pthread_getcpuclockid.c | 2 +-
nptl/pthread_getschedparam.c | 2 +-
nptl/pthread_join.c | 2 +-
nptl/pthread_join_common.c | 118 ++++++++----------------
nptl/pthread_setschedparam.c | 2 +-
nptl/pthread_setschedprio.c | 2 +-
nptl/pthread_timedjoin.c | 2 +-
nptl/pthread_tryjoin.c | 19 ++--
nptl/tst-cleanup5.c | 133 +++++++++++++++++++++++++++
sysdeps/nptl/dl-tls_init_tp.c | 3 +-
sysdeps/nptl/libc_start_call_main.h | 6 ++
sysdeps/nptl/pthreadP.h | 23 ++++-
sysdeps/pthread/Makefile | 1 +
sysdeps/pthread/tst-pthread-exited.c | 106 +++++++++++++++++++++
sysdeps/pthread/tst-thrd-detach.c | 6 +-
23 files changed, 401 insertions(+), 144 deletions(-)
create mode 100644 nptl/tst-cleanup5.c
create mode 100644 sysdeps/pthread/tst-pthread-exited.c
--
2.43.0
More information about the Libc-alpha
mailing list