]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread().
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 12 Mar 2021 17:48:20 +0000 (09:48 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 29 Mar 2021 18:10:54 +0000 (11:10 -0700)
commit053eb17635e19c5cfe8140d0d33dd9330bf6bc22
treef6c1d03e21ba49774546536ec392424fa8005bde
parentcc6d86f2ff9c18f35fd7925d2b0785252af9b892
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().

Sponsored by: Netflix

(cherry picked from commit 640d54045bdbf894ae3c75cd9818c29fc2f6e5e7)
sys/kern/kern_fork.c
sys/kern/kern_kthread.c
sys/sys/proc.h