]>
Commit | Line | Data |
---|---|---|
2d21ac55 A |
1 | /* |
2 | * CDDL HEADER START | |
3 | * | |
4 | * The contents of this file are subject to the terms of the | |
b0d623f7 A |
5 | * Common Development and Distribution License (the "License"). |
6 | * You may not use this file except in compliance with the License. | |
2d21ac55 A |
7 | * |
8 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | |
9 | * or http://www.opensolaris.org/os/licensing. | |
10 | * See the License for the specific language governing permissions | |
11 | * and limitations under the License. | |
12 | * | |
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 | */ | |
b0d623f7 | 21 | |
2d21ac55 | 22 | /* |
b0d623f7 | 23 | * Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
2d21ac55 A |
24 | * Use is subject to license terms. |
25 | */ | |
26 | ||
27 | #ifndef _SYS_SYSTRACE_H | |
28 | #define _SYS_SYSTRACE_H | |
29 | ||
b0d623f7 | 30 | /* #pragma ident "@(#)systrace.h 1.3 06/09/19 SMI" */ |
2d21ac55 | 31 | |
2d21ac55 A |
32 | #ifdef KERNEL |
33 | #ifndef _KERNEL | |
34 | #define _KERNEL /* Solaris vs. Darwin */ | |
35 | #endif | |
36 | #endif | |
37 | ||
38 | #include <sys/dtrace.h> | |
39 | ||
2d21ac55 A |
40 | #ifdef __cplusplus |
41 | extern "C" { | |
42 | #endif | |
43 | ||
44 | #ifdef _KERNEL | |
45 | ||
46 | typedef struct systrace_sysent { | |
47 | dtrace_id_t stsy_entry; | |
48 | dtrace_id_t stsy_return; | |
b0d623f7 | 49 | int32_t (*stsy_underlying)(struct proc *, void *, int *); |
2d21ac55 | 50 | int32_t stsy_return_type; |
2d21ac55 A |
51 | } systrace_sysent_t; |
52 | ||
53 | extern systrace_sysent_t *systrace_sysent; | |
54 | extern systrace_sysent_t *systrace_sysent32; | |
55 | ||
2d21ac55 | 56 | extern void (*systrace_probe)(dtrace_id_t, uint64_t, uint64_t, |
316670eb | 57 | uint64_t, uint64_t, uint64_t); |
2d21ac55 | 58 | extern void systrace_stub(dtrace_id_t, uint64_t, uint64_t, |
316670eb | 59 | uint64_t, uint64_t, uint64_t); |
2d21ac55 A |
60 | |
61 | extern int32_t dtrace_systrace_syscall(struct proc *, void *, int *); | |
62 | ||
63 | extern void dtrace_systrace_syscall_return(unsigned short, int, int *); | |
2d21ac55 A |
64 | |
65 | #ifdef _SYSCALL32_IMPL | |
66 | extern int64_t dtrace_systrace_syscall32(uintptr_t arg0, uintptr_t arg1, | |
67 | uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5); | |
68 | #endif | |
69 | ||
fe8ab488 | 70 | #endif /* _KERNEL */ |
2d21ac55 A |
71 | |
72 | #ifdef __cplusplus | |
73 | } | |
74 | #endif | |
75 | ||
76 | #endif /* _SYS_SYSTRACE_H */ |