PERFORCE change 127558 for review

Marko Zec zec at FreeBSD.org
Mon Oct 15 09:38:16 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=127558

Change 127558 by zec at zec_tpx32 on 2007/10/15 16:37:30

	Allow for sysctl access to per-vcpu variables.  Most probably
	we won't be virtualizing any existing variables but only
	introducing new state there.  NB I wasn't at school when pointer
	arithmetic was taught so this quick kludge needs to be
	revisited and fixed, along a few other places where I do
	nasty and probably non-portable hacks with pointers.  XXX.

Affected files ...

.. //depot/projects/vimage/src/sys/sys/sysctl.h#10 edit

Differences ...

==== //depot/projects/vimage/src/sys/sys/sysctl.h#10 (text+ko) ====

@@ -419,6 +419,10 @@
 		ptr = curthread->td_ucred->cr_vimage->v_procg;		\
 		arg1 = (void *) ((int) ptr + (int) arg1);		\
 		break;							\
+	case V_CPU:							\
+		ptr = curthread->td_ucred->cr_vimage->v_cpu;		\
+		arg1 = (void *) ((int) ptr + (int) arg1);		\
+		break;							\
 	default:							\
 		panic("unsupported module id %d", subs);		\
 	}								\


More information about the p4-projects mailing list