svn commit: r282032 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sun Apr 26 17:23:00 UTC 2015


Author: mjg
Date: Sun Apr 26 17:22:59 2015
New Revision: 282032
URL: https://svnweb.freebsd.org/changeset/base/282032

Log:
  Consistently use p instead of td->td_proc in create_thread
  
  No functional changes.

Modified:
  head/sys/kern/kern_thr.c

Modified: head/sys/kern/kern_thr.c
==============================================================================
--- head/sys/kern/kern_thr.c	Sun Apr 26 16:54:33 2015	(r282031)
+++ head/sys/kern/kern_thr.c	Sun Apr 26 17:22:59 2015	(r282032)
@@ -187,9 +187,9 @@ create_thread(struct thread *td, mcontex
 	}
 
 #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, mcontex
 		}
 	}
 
-	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. */


More information about the svn-src-head mailing list