dtrace_unload.c (179237) | dtrace_unload.c (184698) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * |
21 * $FreeBSD: head/sys/cddl/dev/dtrace/dtrace_unload.c 179237 2008-05-23 05:59:42Z jb $ | 21 * $FreeBSD: head/sys/cddl/dev/dtrace/dtrace_unload.c 184698 2008-11-05 19:39:11Z rodrigc $ |
22 * 23 */ 24 25static int 26dtrace_unload() 27{ 28 dtrace_state_t *state; 29 int error = 0; 30 | 22 * 23 */ 24 25static int 26dtrace_unload() 27{ 28 dtrace_state_t *state; 29 int error = 0; 30 |
31#if __FreeBSD_version < 800039 |
|
31 /* 32 * Check if there is still an event handler callback 33 * registered. 34 */ 35 if (eh_tag != 0) { 36 /* De-register the device cloning event handler. */ 37 EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); 38 eh_tag = 0; 39 40 /* Stop device cloning. */ 41 clone_cleanup(&dtrace_clones); 42 } | 32 /* 33 * Check if there is still an event handler callback 34 * registered. 35 */ 36 if (eh_tag != 0) { 37 /* De-register the device cloning event handler. */ 38 EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); 39 eh_tag = 0; 40 41 /* Stop device cloning. */ 42 clone_cleanup(&dtrace_clones); 43 } |
44#else 45 destroy_dev(dtrace_dev); 46#endif |
|
43 44 mutex_enter(&dtrace_provider_lock); 45 mutex_enter(&dtrace_lock); 46 mutex_enter(&cpu_lock); 47 48 ASSERT(dtrace_opens == 0); 49 50 if (dtrace_helpers > 0) { --- 88 unchanged lines hidden --- | 47 48 mutex_enter(&dtrace_provider_lock); 49 mutex_enter(&dtrace_lock); 50 mutex_enter(&cpu_lock); 51 52 ASSERT(dtrace_opens == 0); 53 54 if (dtrace_helpers > 0) { --- 88 unchanged lines hidden --- |