Date: Sun, 7 May 2006 23:16:28 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96808 for review Message-ID: <200605072316.k47NGSea086072@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96808 Change 96808 by jb@jb_freebsd2 on 2006/05/07 23:15:39 Clean up include file paths. Use the new kmem/vmem compatibility implementation. Simplify the thread-specific key macro to suit FreeBSD. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#20 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#20 (text+ko) ==== @@ -53,6 +53,7 @@ #include <sys/filio.h> #include <sys/kdb.h> #include <sys/kernel.h> +#include <sys/kmem.h> #include <sys/kthread.h> #include <sys/limits.h> #include <sys/linker.h> @@ -70,13 +71,14 @@ #include <machine/stdarg.h> #include <cddl/dev/dtrace/dtrace_mutex.h> -#include <contrib/opensolaris/uts/common/sys/dtrace_impl.h> +#include <sys/dtrace_impl.h> #include <cddl/dev/dtrace/dtrace_hacks.h> #define DTRACE_MINOR 0 MALLOC_DECLARE(M_DTRACE); MALLOC_DEFINE(M_DTRACE, "dtrace", "Dynamic Trace"); +#define M_KMEM M_DTRACE static d_close_t dtrace_close; static d_ioctl_t dtrace_ioctl; @@ -338,6 +340,7 @@ * no way for a global variable key signature to match a thread-local key * signature. */ +#if defined(sun) #define DTRACE_TLS_THRKEY(where) { \ uint_t intr = 0; \ uint_t actv = CPU->cpu_intr_actv >> (LOCK_LEVEL + 1); \ @@ -347,6 +350,13 @@ (where) = ((curthread->t_did + DIF_VARIABLE_MAX) & \ (((uint64_t)1 << 61) - 1)) | ((uint64_t)intr << 61); \ } +#else +#define DTRACE_TLS_THRKEY(where) { \ + uint_t intr = 0; \ + (where) = ((curthread->td_tid + DIF_VARIABLE_MAX) & \ + (((uint64_t)1 << 61) - 1)) | ((uint64_t)intr << 61); \ +} +#endif #define DTRACE_STORE(type, tomax, offset, what) \ *((type *)((uintptr_t)(tomax) + (uintptr_t)offset)) = (type)(what);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605072316.k47NGSea086072>