[PATCH] Hurd: make sigstates hold a reference on thread ports
authorRichard Braun <rbraun@sceen.net>
Tue, 23 Apr 2024 16:23:00 +0000 (19:23 +0300)
committerAdrian Bunk <bunk@debian.org>
Tue, 23 Apr 2024 16:23:00 +0000 (19:23 +0300)
commit1841eae2a3794e4066be4053687b726d9d9bda45
tree220980aa376ada14043bdc05ac5f3cb851486cb7
parentfdb67791f457ffa67baa6d02087ed4135e74b51f
[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 tg-sigstate_thread_reference.diff
hurd/hurd/signal.h
hurd/hurdsig.c