[PATCH] Hurd: make sigstates hold a reference on thread ports
authorRichard Braun <rbraun@sceen.net>
Thu, 12 Mar 2020 22:47:03 +0000 (22:47 +0000)
committerAurelien Jarno <aurel32@debian.org>
Thu, 12 Mar 2020 22:47:03 +0000 (22:47 +0000)
commitdb0fa12e42ad1c830ce57325099c8b003c52d99c
tree4d3511ab2079714e26b1ca9f49008017ad67ebad
parent011a281fcbc25c5795e61abc1b8c9fc4ca9d981f
[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