socsvn commit: r239824 - in soc2012/rudot/sys: kern sys

rudot at FreeBSD.org rudot at FreeBSD.org
Fri Jul 27 07:53:55 UTC 2012


Author: rudot
Date: Fri Jul 27 07:53:52 2012
New Revision: 239824
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239824

Log:
  fix includes and some other details

Modified:
  soc2012/rudot/sys/kern/kern_racct.c
  soc2012/rudot/sys/sys/racct.h

Modified: soc2012/rudot/sys/kern/kern_racct.c
==============================================================================
--- soc2012/rudot/sys/kern/kern_racct.c	Fri Jul 27 05:48:42 2012	(r239823)
+++ soc2012/rudot/sys/kern/kern_racct.c	Fri Jul 27 07:53:52 2012	(r239824)
@@ -49,13 +49,14 @@
 #include <sys/racct.h>
 #include <sys/resourcevar.h>
 #include <sys/sbuf.h>
+#include <sys/sched.h>
 #include <sys/sdt.h>
+#include <sys/smp.h>
 #include <sys/sx.h>
 #include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/umtx.h>
 #include <machine/smp.h>
-#include <sys/sched.h>
 
 #ifdef RCTL
 #include <sys/rctl.h>
@@ -278,7 +279,7 @@
  * of the ccpu variable. In ULE it is defined to be zero which saves us some
  * work.
  */
-u_int
+static u_int
 racct_getpcpu(struct proc *p)
 {
 	u_int swtime;
@@ -938,10 +939,12 @@
 			break;
 		case TDS_RUNNING:
 			thread_lock(td);
-			cpuid = td->td_oncpu;
 			td->td_flags |= TDF_NEEDRESCHED;
+#ifdef SMP
+			cpuid = td->td_oncpu;
 			if ((cpuid != NOCPU) && (td != curthread))
 				ipi_cpu(cpuid, IPI_AST);
+#endif
 			thread_unlock(td);
 			break;
 		default:

Modified: soc2012/rudot/sys/sys/racct.h
==============================================================================
--- soc2012/rudot/sys/sys/racct.h	Fri Jul 27 05:48:42 2012	(r239823)
+++ soc2012/rudot/sys/sys/racct.h	Fri Jul 27 07:53:52 2012	(r239824)
@@ -152,7 +152,6 @@
 void	racct_proc_ucred_changed(struct proc *p, struct ucred *oldcred,
 	    struct ucred *newcred);
 void	racct_move(struct racct *dest, struct racct *src);
-u_int	racct_getpcpu(struct proc *p);
 int	racct_proc_disabled(struct proc *p);
 
 #endif /* !_RACCT_H_ */


More information about the svn-soc-all mailing list