[PATCH] Hurd: make sigstates hold a reference on thread ports
authorRichard Braun <rbraun@sceen.net>
Wed, 22 Jul 2020 22:26:24 +0000 (23:26 +0100)
committerAurelien Jarno <aurel32@debian.org>
Wed, 22 Jul 2020 22:26:24 +0000 (23:26 +0100)
commit30cf9a2338f24f26cdb6d9010bfd4a1a0397fc46
tree164f856bcb7eab764d250edfeeb759fef3a8c2d4
parent107957b0db3706127a02c399747b91613619d90f
[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