HomeFreeBSD

sig_handle_first_stop(): allow NULL leader thread

Description

sig_handle_first_stop(): allow NULL leader thread

Remove the ext argument, the ext condition is indicated by NULL td.
If the td argument is NULL, p_xthread is set to NULL, for initial
attach. Previous commit prepared ptrace() code for the case.

sig_suspend_thread() only uses the td arg to avoid interrupting the
current thread as micro-optimization, so it is fine to pass NULL.

Tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D49961

Details

Provenance
kibAuthored on Apr 21 2025, 12:54 PM
Reviewer
markj
Differential Revision
D49961: Fix handling of p_xthread
Parents
rGb63281884e0e: ptrace(): p_xthread could be NULL for P_STOPPED_TRACE
Branches
Unknown
Tags
Unknown