summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-04-26 17:22:59 +0000
committermjg <mjg@FreeBSD.org>2015-04-26 17:22:59 +0000
commitec150b0d9ee1626c590edfff465c2d0c6028e5ff (patch)
tree091e49658bb66fdcad2494429ee10077f10c1a73 /sys/kern/kern_thr.c
parent11273df12488b002436d9ff19c5f9f72d4c6e3c1 (diff)
downloadFreeBSD-src-ec150b0d9ee1626c590edfff465c2d0c6028e5ff.zip
FreeBSD-src-ec150b0d9ee1626c590edfff465c2d0c6028e5ff.tar.gz
Consistently use p instead of td->td_proc in create_thread
No functional changes.
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 280bc0b..d5f1ce6 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -187,9 +187,9 @@ create_thread(struct thread *td, mcontext_t *ctx,
}
#ifdef RACCT
- PROC_LOCK(td->td_proc);
+ PROC_LOCK(p);
error = racct_add(p, RACCT_NTHR, 1);
- PROC_UNLOCK(td->td_proc);
+ PROC_UNLOCK(p);
if (error != 0)
return (EPROCLIM);
#endif
@@ -250,9 +250,9 @@ create_thread(struct thread *td, mcontext_t *ctx,
}
}
- PROC_LOCK(td->td_proc);
- td->td_proc->p_flag |= P_HADTHREADS;
- thread_link(newtd, p);
+ PROC_LOCK(p);
+ p->p_flag |= P_HADTHREADS;
+ 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. */
OpenPOWER on IntegriCloud