git-sigstate_thread_reference
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Tue, 27 May 2025 10:40:04 +0000 (11:40 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 27 May 2025 10:40:04 +0000 (11:40 +0100)
commit7b039251afb213ccd79c1f400ff6cf89ce4f3b0e
tree23878a805dca19a9baf7609e9c34809b50793dc5
parent78aa011d2b557048e2069a9a8a741a80f84dc8d6
git-sigstate_thread_reference

Committed for 2.33

From: Richard Braun <rbraun@sceen.net>
Subject: [PATCH] Hurd: make sigstates hold a reference on thread ports

This change is required in order to correctly release per-thread
resources. Directly reusing the threading library reference isn't
possible since the sigstate is also used early in the main thread,
before threading is initialized.

* hurd/hurd/signal.h (_hurd_self_sigstate): Drop thread reference after
calling _hurd_thread_sigstate.
(_hurd_critical_section_lock): Likewise.
* hurd/hurdsig.c (_hurd_thread_sigstate): Add a reference on the thread.
(_hurd_sigstate_delete): Drop thread reference.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-sigstate_thread_reference.diff
hurd/hurd/signal.h
hurd/hurdsig.c