[PATCH v6 0/4] NPTL synchronization fixes

Adhemerval Zanella adhemerval.zanella@linaro.org
Thu Dec 4 17:46:36 GMT 2025


Chagnes from v5 [1]
* Extend BZ 28267 tests to cover asynchronous cancellation.
* Remov thread_state_t type.
* Issue a non cancellable __pthread_clockjoin_ex on pthread_detach
  (since it is declared as _THROW).
* Remove check_for_deadlock over a simplifies test.
* Extend __pthread_tryjoin_np comment on how the code assert it
  will not act as an cancellation entrypoint.
* Block signals before set jointstate on __libc_start_call_main.
* Change cancelable futex call on __pthread_create_2_1.  

Changes from v4 [2]:
* Rebased against master.
* Reword some comments.

[1] https://patchwork.sourceware.org/project/glibc/list/?series=54776
[2] https://patchwork.sourceware.org/project/glibc/list/?series=50344

Adhemerval Zanella (4):
  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: Use __futex_abstimed_wait64 on pthread_create

 nptl/Makefile                        |   1 +
 nptl/descr.h                         |  26 +++--
 nptl/nptl-stack.h                    |   2 +-
 nptl/pthread_cancel.c                |   3 +-
 nptl/pthread_create.c                |  39 +++++--
 nptl/pthread_detach.c                |  44 ++++----
 nptl/pthread_getattr_np.c            |   2 +-
 nptl/pthread_getcpuclockid.c         |   2 +-
 nptl/pthread_getschedparam.c         |   2 +-
 nptl/pthread_join_common.c           | 113 ++++++-------------
 nptl/pthread_setschedparam.c         |   2 +-
 nptl/pthread_setschedprio.c          |   2 +-
 nptl/pthread_tryjoin.c               |  25 +++--
 nptl/tst-cleanup5.c                  | 158 +++++++++++++++++++++++++++
 sysdeps/nptl/dl-tls_init_tp.c        |   3 +-
 sysdeps/nptl/libc_start_call_main.h  |   9 ++
 sysdeps/nptl/pthreadP.h              |  25 ++++-
 sysdeps/pthread/Makefile             |   1 +
 sysdeps/pthread/tst-pthread-exited.c | 106 ++++++++++++++++++
 sysdeps/pthread/tst-thrd-detach.c    |   6 +-
 20 files changed, 426 insertions(+), 145 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