From owner-p4-projects@FreeBSD.ORG Sat Dec 22 04:32:06 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 230F116A46B; Sat, 22 Dec 2007 04:32:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6030516A421 for ; Sat, 22 Dec 2007 04:32:05 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 432AA13C4D3 for ; Sat, 22 Dec 2007 04:32:05 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lBM4W5Eo015179 for ; Sat, 22 Dec 2007 04:32:05 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBM4W4OJ015168 for perforce@freebsd.org; Sat, 22 Dec 2007 04:32:04 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Dec 2007 04:32:04 GMT Message-Id: <200712220432.lBM4W4OJ015168@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 131408 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: Sat, 22 Dec 2007 04:32:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=131408 Change 131408 by jb@jb_freebsd1 on 2007/12/22 04:31:53 Include the machine-dependent code and the backend so that the functions can all be static. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/os/cyclic.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/os/cyclic.c#6 (text) ==== @@ -563,6 +563,10 @@ #include #else #include +#include +#include +#include +#include #define gethrtime_unscaled dtrace_gethrtime static cyclic_cpu_t cyclic_cpu[MAXCPU]; static kmutex_t cpu_lock; @@ -2172,7 +2176,6 @@ c->cpu_cyclic = cpu; } -#if defined(sun) static void cyclic_unconfigure(cpu_t *c) { @@ -2225,7 +2228,6 @@ c->cpu_cyclic = NULL; } -#endif #if defined(sun) static int @@ -2932,6 +2934,26 @@ mutex_exit(&cpu_lock); } +#if !defined(sun) +static void +cyclic_uninit(void) +{ + struct pcpu *pc; + cpu_t *c; + int id; + + for (id = 0; id <= mp_maxid; id++) { + if ((pc = pcpu_find(id)) == NULL) + continue; + + c = &cyclic_cpu[pc->pc_cpuid]; + + cyclic_offline(c); + cyclic_unconfigure(c); + } +} +#endif + /* * int cyclic_juggle(cpu_t *) * @@ -3430,3 +3452,8 @@ } #endif } + +#if !defined(sun) +#include "cyclic_machdep.c" +#include "kern_cyclic.c" +#endif