[PATCH] Hurd: make sigstates hold a reference on thread ports
authorRichard Braun <rbraun@sceen.net>
Tue, 5 May 2020 18:12:38 +0000 (19:12 +0100)
committerAurelien Jarno <aurel32@debian.org>
Tue, 5 May 2020 18:12:38 +0000 (19:12 +0100)
commit96ad3fea8a0afdd13f08663aec0b184f45e97b82
tree04b707c3aaa454ee00c2989d649ed1b7713e6b72
parent795db62070030e1ecf95c053bcdd36aab6f92ba6
[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