From 46f09d5bc3f6480ce5db48b9d76f3e83299f588c Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 19 Mar 2008 06:19:01 +0000 Subject: - 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. --- sys/kern/kern_thr.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sys/kern/kern_thr.c') diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 25bf8d1..3d410b5 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -229,14 +229,12 @@ create_thread(struct thread *td, mcontext_t *ctx, PROC_LOCK(td->td_proc); td->td_proc->p_flag |= P_HADTHREADS; newtd->td_sigmask = td->td_sigmask; - PROC_SLOCK(p); thread_link(newtd, p); bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); thread_lock(td); /* let the scheduler know about these things. */ sched_fork_thread(td, newtd); thread_unlock(td); - PROC_SUNLOCK(p); PROC_UNLOCK(p); thread_lock(newtd); if (rtp != NULL) { -- cgit v1.1