Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2007 16:38:15 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 127558 for review
Message-ID:  <200710151638.l9FGcFcD068364@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127558

Change 127558 by zec@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);		\
 	}								\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710151638.l9FGcFcD068364>