PERFORCE change 97922 for review
John Birrell
jb at FreeBSD.org
Fri May 26 22:27:49 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=97922
Change 97922 by jb at jb_freebsd2 on 2006/05/27 05:26:34
Sun won't accept code updates with #ifdefs, so I might as well start
cleaning up files so that they look right in FreeBSD.
This file is a prime candidate for being moved to sys/sys/dtrace.h and
treated as FreeBSD-specific.
There are code maintenance issues here which I don't have a solution to.
It would be nice if there was a portable way to use OpenSolaris code. I
just haven't figured out how to do that. SysV != BSD. Solaris != FreeBSD. 8-(
Affected files ...
.. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#17 edit
Differences ...
==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#17 (text) ====
@@ -2254,17 +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))
-
-#define DTRACE_CPUFLAG_SET(flag) \
- (cpu_core[CPU->cpu_id].cpuc_dtrace_flags |= (flag))
-
-#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) \
@@ -2272,7 +2262,6 @@
#define DTRACE_CPUFLAG_CLEAR(flag) \
(cpu_core[curcpu].cpuc_dtrace_flags &= ~(flag))
-#endif
#if !defined(sun)
void cmn_err(int, const char *, ...);
More information about the p4-projects
mailing list