xref: /onnv-gate/usr/src/uts/common/sys/systrace.h (revision 2769:b2e3d55c6e12)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*2769Sahl  * Common Development and Distribution License (the "License").
6*2769Sahl  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
21*2769Sahl 
220Sstevel@tonic-gate /*
23*2769Sahl  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef _SYS_SYSTRACE_H
280Sstevel@tonic-gate #define	_SYS_SYSTRACE_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #include <sys/dtrace.h>
330Sstevel@tonic-gate 
340Sstevel@tonic-gate #ifdef	__cplusplus
350Sstevel@tonic-gate extern "C" {
360Sstevel@tonic-gate #endif
370Sstevel@tonic-gate 
380Sstevel@tonic-gate #ifdef _KERNEL
390Sstevel@tonic-gate 
400Sstevel@tonic-gate typedef struct systrace_sysent {
410Sstevel@tonic-gate 	dtrace_id_t	stsy_entry;
420Sstevel@tonic-gate 	dtrace_id_t	stsy_return;
430Sstevel@tonic-gate 	int64_t		(*stsy_underlying)();
440Sstevel@tonic-gate } systrace_sysent_t;
450Sstevel@tonic-gate 
460Sstevel@tonic-gate extern systrace_sysent_t *systrace_sysent;
470Sstevel@tonic-gate extern systrace_sysent_t *systrace_sysent32;
480Sstevel@tonic-gate 
490Sstevel@tonic-gate extern void (*systrace_probe)(dtrace_id_t, uintptr_t, uintptr_t,
50*2769Sahl     uintptr_t, uintptr_t, uintptr_t, uintptr_t);
510Sstevel@tonic-gate extern void systrace_stub(dtrace_id_t, uintptr_t, uintptr_t,
52*2769Sahl     uintptr_t, uintptr_t, uintptr_t, uintptr_t);
530Sstevel@tonic-gate 
540Sstevel@tonic-gate extern int64_t dtrace_systrace_syscall(uintptr_t arg0, uintptr_t arg1,
550Sstevel@tonic-gate     uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5);
560Sstevel@tonic-gate 
570Sstevel@tonic-gate #ifdef _SYSCALL32_IMPL
580Sstevel@tonic-gate extern int64_t dtrace_systrace_syscall32(uintptr_t arg0, uintptr_t arg1,
590Sstevel@tonic-gate     uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5);
600Sstevel@tonic-gate #endif
610Sstevel@tonic-gate 
620Sstevel@tonic-gate #endif
630Sstevel@tonic-gate 
640Sstevel@tonic-gate #ifdef	__cplusplus
650Sstevel@tonic-gate }
660Sstevel@tonic-gate #endif
670Sstevel@tonic-gate 
680Sstevel@tonic-gate #endif	/* _SYS_SYSTRACE_H */
69