Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_thr.c
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | if (error != 0) { | ||||
goto fail; | goto fail; | ||||
} | } | ||||
} | } | ||||
PROC_LOCK(td->td_proc); | PROC_LOCK(td->td_proc); | ||||
td->td_proc->p_flag |= P_HADTHREADS; | td->td_proc->p_flag |= P_HADTHREADS; | ||||
thread_link(newtd, p); | thread_link(newtd, p); | ||||
bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); | bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); | ||||
newtd->td_pax = p->p_pax; | |||||
thread_lock(td); | thread_lock(td); | ||||
/* let the scheduler know about these things. */ | /* let the scheduler know about these things. */ | ||||
sched_fork_thread(td, newtd); | sched_fork_thread(td, newtd); | ||||
thread_unlock(td); | thread_unlock(td); | ||||
if (P_SHOULDSTOP(p)) | if (P_SHOULDSTOP(p)) | ||||
newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; | newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
▲ Show 20 Lines • Show All 293 Lines • Show Last 20 Lines |