diff options
author | jeff <jeff@FreeBSD.org> | 2008-03-19 06:19:01 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2008-03-19 06:19:01 +0000 |
commit | 46f09d5bc3f6480ce5db48b9d76f3e83299f588c (patch) | |
tree | 720fece23c8482c35e341e275a0f4068ee43126f /sys/kern/kern_kthread.c | |
parent | f8600f40e7fcf241985d8a978c63889de0969bfb (diff) | |
download | FreeBSD-src-46f09d5bc3f6480ce5db48b9d76f3e83299f588c.zip FreeBSD-src-46f09d5bc3f6480ce5db48b9d76f3e83299f588c.tar.gz |
- Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from
requiring the per-process spinlock to only requiring the process lock.
- Reflect these changes in the proc.h documentation and consumers throughout
the kernel. This is a substantial reduction in locking cost for these
fields and was made possible by recent changes to threading support.
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r-- | sys/kern/kern_kthread.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index ed74774..18f1672 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -292,14 +292,12 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p, PROC_LOCK(p); p->p_flag |= P_HADTHREADS; newtd->td_sigmask = oldtd->td_sigmask; /* XXX dubious */ - PROC_SLOCK(p); thread_link(newtd, p); thread_lock(oldtd); /* let the scheduler know about these things. */ sched_fork_thread(oldtd, newtd); TD_SET_CAN_RUN(newtd); thread_unlock(oldtd); - PROC_SUNLOCK(p); PROC_UNLOCK(p); |