systrace.c (256281) | systrace.c (270998) |
---|---|
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 --- 151 unchanged lines hidden (view full) --- 160#endif 161 } 162 163 if (enabled) { 164 ASSERT(sysent[sysnum].sy_callc == dtrace_systrace_syscall); 165 return; 166 } 167 | 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 --- 151 unchanged lines hidden (view full) --- 160#endif 161 } 162 163 if (enabled) { 164 ASSERT(sysent[sysnum].sy_callc == dtrace_systrace_syscall); 165 return; 166 } 167 |
168 (void) casptr(&sysent[sysnum].sy_callc, | 168 (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, |
169 (void *)systrace_sysent[sysnum].stsy_underlying, 170 (void *)dtrace_systrace_syscall); 171#ifdef _SYSCALL32_IMPL | 169 (void *)systrace_sysent[sysnum].stsy_underlying, 170 (void *)dtrace_systrace_syscall); 171#ifdef _SYSCALL32_IMPL |
172 (void) casptr(&sysent32[sysnum].sy_callc, | 172 (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, |
173 (void *)systrace_sysent32[sysnum].stsy_underlying, 174 (void *)dtrace_systrace_syscall32); 175#endif 176} 177 178/*ARGSUSED*/ 179static void 180systrace_disable(void *arg, dtrace_id_t id, void *parg) 181{ 182 int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); 183 int disable = (systrace_sysent[sysnum].stsy_entry == DTRACE_IDNONE || 184 systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); 185 186 if (disable) { | 173 (void *)systrace_sysent32[sysnum].stsy_underlying, 174 (void *)dtrace_systrace_syscall32); 175#endif 176} 177 178/*ARGSUSED*/ 179static void 180systrace_disable(void *arg, dtrace_id_t id, void *parg) 181{ 182 int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); 183 int disable = (systrace_sysent[sysnum].stsy_entry == DTRACE_IDNONE || 184 systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); 185 186 if (disable) { |
187 (void) casptr(&sysent[sysnum].sy_callc, | 187 (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, |
188 (void *)dtrace_systrace_syscall, 189 (void *)systrace_sysent[sysnum].stsy_underlying); 190 191#ifdef _SYSCALL32_IMPL | 188 (void *)dtrace_systrace_syscall, 189 (void *)systrace_sysent[sysnum].stsy_underlying); 190 191#ifdef _SYSCALL32_IMPL |
192 (void) casptr(&sysent32[sysnum].sy_callc, | 192 (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, |
193 (void *)dtrace_systrace_syscall32, 194 (void *)systrace_sysent32[sysnum].stsy_underlying); 195#endif 196 } 197 198 if (SYSTRACE_ISENTRY((uintptr_t)parg)) { 199 systrace_sysent[sysnum].stsy_entry = DTRACE_IDNONE; 200#ifdef _SYSCALL32_IMPL --- 173 unchanged lines hidden --- | 193 (void *)dtrace_systrace_syscall32, 194 (void *)systrace_sysent32[sysnum].stsy_underlying); 195#endif 196 } 197 198 if (SYSTRACE_ISENTRY((uintptr_t)parg)) { 199 systrace_sysent[sysnum].stsy_entry = DTRACE_IDNONE; 200#ifdef _SYSCALL32_IMPL --- 173 unchanged lines hidden --- |