aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2002-07-14 08:29:15 +0000
committerJulian Elischer <julian@FreeBSD.org>2002-07-14 08:29:15 +0000
commit66d593142d175efa5c50b0b6e801d6b4e2208676 (patch)
treebf7989fe050e8f8cef78bc87c3607f333e4d7035 /sys/kern
parent8fe085c7ec4b6b28400f24d65c70463f5767bd02 (diff)
downloadsrc-66d593142d175efa5c50b0b6e801d6b4e2208676.tar.gz
src-66d593142d175efa5c50b0b6e801d6b4e2208676.zip
part of a greater patch set..
1/ don't need to set td_state to TDS_RUNNING in fork_return. it's already set in choosethread(). 2/ Set a child process state to "normal" as opposed to "new" when we allow it to be put on the run queue. Allows child to receive signals from the parent if the parent runs first and tries to immediatly signal he child. Submitted by: (part 2) Thomas Moestl <tmoestl@gmx.net>
Notes
Notes: svn path=/head/; revision=99945
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 77481cad484f..53b3eedd365a 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -729,6 +729,7 @@ again:
p2->p_acflag = AFORK;
if ((flags & RFSTOPPED) == 0) {
mtx_lock_spin(&sched_lock);
+ p2->p_state = PRS_NORMAL;
setrunqueue(td2);
mtx_unlock_spin(&sched_lock);
}
@@ -833,7 +834,6 @@ fork_exit(callout, arg, frame)
td->td_kse->ke_oncpu = PCPU_GET(cpuid);
p->p_state = PRS_NORMAL;
- td->td_state = TDS_RUNNING; /* Already done in switch() on 386. */
/*
* Finish setting up thread glue. We need to initialize
* the thread into a td_critnest=1 state. Some platforms