From owner-p4-projects@FreeBSD.ORG Thu May 25 01:54:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C77C16A46D; Thu, 25 May 2006 01:54:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A7F316A46B for ; Thu, 25 May 2006 01:54:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2223F43D48 for ; Thu, 25 May 2006 01:54:23 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4P1rUS5005897 for ; Thu, 25 May 2006 01:53:30 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4P1rUFb005894 for perforce@freebsd.org; Thu, 25 May 2006 01:53:30 GMT (envelope-from jb@freebsd.org) Date: Thu, 25 May 2006 01:53:30 GMT Message-Id: <200605250153.k4P1rUFb005894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 97784 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2006 01:54:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=97784 Change 97784 by jb@jb_freebsd2 on 2006/05/25 01:52:54 The current CPU is referenced in a different way on FreeBSD. It's a pain to have to compatible-ise the 'CPU->' so just define these macros the way wee need them. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#16 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#16 (text) ==== @@ -2254,6 +2254,7 @@ extern void dtrace_getfsr(uint64_t *); #endif +#if defined(sun) #define DTRACE_CPUFLAG_ISSET(flag) \ (cpu_core[CPU->cpu_id].cpuc_dtrace_flags & (flag)) @@ -2262,6 +2263,16 @@ #define DTRACE_CPUFLAG_CLEAR(flag) \ (cpu_core[CPU->cpu_id].cpuc_dtrace_flags &= ~(flag)) +#else +#define DTRACE_CPUFLAG_ISSET(flag) \ + (cpu_core[curcpu].cpuc_dtrace_flags & (flag)) + +#define DTRACE_CPUFLAG_SET(flag) \ + (cpu_core[curcpu].cpuc_dtrace_flags |= (flag)) + +#define DTRACE_CPUFLAG_CLEAR(flag) \ + (cpu_core[curcpu].cpuc_dtrace_flags &= ~(flag)) +#endif #if !defined(sun) void cmn_err(int, const char *, ...);