[PATCH] Hurd: make sigstates hold a reference on thread ports
authorRichard Braun <rbraun@sceen.net>
Wed, 16 Dec 2020 21:33:25 +0000 (21:33 +0000)
committerSamuel Thibault <sthibault@debian.org>
Wed, 16 Dec 2020 21:33:25 +0000 (21:33 +0000)
commitf02ab55b8a1b5a44ff37cefe5c8951aadfc9a55f
tree59f6fa8fa09378939e4e1dafab5c8888c65bb6e4
parentf998b69304a50274dd4021b6cc8229fd03d89796
[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