HomeFreeBSD

Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread().

Description

Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread().

This permits these routines to use special logic for initializing MD
kthread state.

For the kproc case, this required moving the logic to set these flags
from kproc_create() into do_fork().

Reviewed by: kib
MFC after: 1 week
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29207

Details

Provenance
jhbAuthored on Mar 12 2021, 5:48 PM
Reviewer
kib
Differential Revision
D29207: Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread().
Parents
rG5a50eb6585ef: Don't pass RFPROC to kproc_create(), it is redundant.
Branches
Unknown
Tags
Unknown