From owner-p4-projects@FreeBSD.ORG Sun May 7 23:16:35 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 C3BEE16A406; Sun, 7 May 2006 23:16:35 +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 4F58916A405 for ; Sun, 7 May 2006 23:16:35 +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 A5AFC43D5E for ; Sun, 7 May 2006 23:16:29 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k47NGTXk086078 for ; Sun, 7 May 2006 23:16:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k47NGSea086072 for perforce@freebsd.org; Sun, 7 May 2006 23:16:28 GMT (envelope-from jb@freebsd.org) Date: Sun, 7 May 2006 23:16:28 GMT Message-Id: <200605072316.k47NGSea086072@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 96808 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: Sun, 07 May 2006 23:16:36 -0000 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 #include #include +#include #include #include #include @@ -70,13 +71,14 @@ #include #include -#include +#include #include #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);