summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 2356372..5a5a96f 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -610,7 +610,9 @@ kse_create(struct thread *td, struct kse_create_args *uap)
ncpus = virtual_cpu;
/* Easier to just set it than to test and set */
+ PROC_LOCK(p);
p->p_flag |= P_THREADED;
+ PROC_UNLOCK(p);
kg = td->td_ksegrp;
if (uap->newgroup) {
/* Have race condition but it is cheap */
OpenPOWER on IntegriCloud