git-sigstate_thread_reference
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Wed, 30 Apr 2025 01:01:35 +0000 (09:01 +0800)
committerSean Whitton <spwhitton@spwhitton.name>
Wed, 30 Apr 2025 01:01:35 +0000 (09:01 +0800)
commitbbefcf3c84ba8c8a2b0fa0ef31d7a8415b48a7a2
tree4d0ff7f50fdb2d499d644bb140fa0c1730566e1a
parent763981155634c74ee09ac824849c12cf06b4742c
git-sigstate_thread_reference

Committed for 2.33

From: Richard Braun <rbraun@sceen.net>
Subject: [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 git-sigstate_thread_reference.diff
hurd/hurd/signal.h
hurd/hurdsig.c