]> 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>
Fri, 12 Mar 2021 17:48:20 +0000 (09:48 -0800)
commit640d54045bdbf894ae3c75cd9818c29fc2f6e5e7
tree6d923ff9c2a34dfe718910b9ff22b34450613d13
parent5a50eb6585ef8d1a40c8086bab8639cc56f00df9
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
sys/kern/kern_fork.c
sys/kern/kern_kthread.c
sys/sys/proc.h