Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Apr 2006 07:05:25 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95764 for review
Message-ID:  <200604210705.k3L75Pbo043308@repoman.freebsd.org>

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

Change 95764 by jb@jb_freebsd2 on 2006/04/21 07:04:52

	Add a new system header for CPU variables. This file is named
	the same way as Sun's file and it has their license. It has to
	exist as a separate file so that it can retain their license.
	I don't think it's possible to add CDDL restricted code to
	BSD licensed files.
	
	The array of cpu_core structures is explicitly for DTrace. The
	entire array must be mapped across all processors so that 
	DTrace running on one processor can trace a process running on
	a different processor. The array exists as a global variable
	because that's how Sun's code accesses it.

Affected files ...

.. //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#2 edit
.. //depot/projects/dtrace/src/sys/sys/cpuvar.h#1 add

Differences ...

==== //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#2 (text+ko) ====

@@ -46,6 +46,7 @@
 __FBSDID("$FreeBSD: src/sys/kern/subr_pcpu.c,v 1.8 2005/11/03 21:06:29 jhb Exp $");
 
 #include "opt_ddb.h"
+#include "opt_kdtrace.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -59,6 +60,12 @@
 static struct pcpu *cpuid_to_pcpu[MAXCPU];
 struct cpuhead cpuhead = SLIST_HEAD_INITIALIZER(cpuhead);
 
+#ifdef KDTRACE
+#include <sys/cpuvar.h>
+
+cpu_core_t	cpu_core[MAXCPU];
+#endif
+
 /*
  * Initialize the MI portions of a struct pcpu.
  */



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