Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/avintr.h
+++ new/usr/src/uts/common/sys/avintr.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22 23 * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 24 */
24 25
25 26 #ifndef _SYS_AVINTR_H
26 27 #define _SYS_AVINTR_H
27 28
28 29
29 30 #include <sys/mutex.h>
30 31 #include <sys/dditypes.h>
31 32 #include <sys/ddi_intr.h>
32 33
33 34 #ifdef __cplusplus
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
34 35 extern "C" {
35 36 #endif
36 37
37 38 /*
38 39 * Period of autovector structures (add this in to get the next level).
39 40 */
40 41 #define MAXIPL 16
41 42 #define INT_IPL(x) (x)
42 43 #define AV_INT_SPURIOUS -1
43 44
44 -#ifdef __STDC__
45 45 typedef uint_t (*avfunc)(caddr_t, caddr_t);
46 -#else
47 -typedef uint_t (*avfunc)();
48 -#endif /* __STDC__ */
49 46
50 47 struct autovec {
51 48
52 49 /*
53 50 * Interrupt handler and argument to pass to it.
54 51 */
55 52
56 53 struct autovec *av_link; /* pointer to next on in chain */
57 54 uint_t (*av_vector)();
58 55 caddr_t av_intarg1;
59 56 caddr_t av_intarg2;
60 57 uint64_t *av_ticksp;
61 58 uint_t av_prilevel; /* priority level */
62 59
63 60 /*
64 61 * Interrupt handle/id (like intrspec structure pointer) used to
65 62 * identify a specific instance of interrupt handler in case we
66 63 * have to remove the interrupt handler later.
67 64 *
68 65 */
69 66 void *av_intr_id;
70 67 dev_info_t *av_dip;
71 68 ushort_t av_flags; /* pending flags */
72 69 struct autovec *av_ipl_link; /* pointer to next on ipl chain */
73 70 };
74 71
75 72 #define AV_PENTRY_VECTMASK 0xff /* low 8 bit used for irqno */
76 73 #define AV_PENTRY_PEND 0x100 /* pending hardware interrupt */
77 74 #define AV_PENTRY_ONPROC 0x200 /* being serviced by CPU */
78 75 #define AV_PENTRY_LEVEL 0x8000 /* level-triggered interrupt */
79 76
80 77 struct av_head {
81 78 struct autovec *avh_link;
82 79 ushort_t avh_hi_pri;
83 80 ushort_t avh_lo_pri;
84 81 };
85 82
86 83 /* softing contains a bit field of software interrupts which are pending */
87 84 struct softint {
88 85 int st_pending;
89 86 };
90 87
91 88 #ifdef _KERNEL
92 89
93 90 extern kmutex_t av_lock;
94 91 extern ddi_softint_hdl_impl_t softlevel_hdl[];
95 92 extern ddi_softint_hdl_impl_t softlevel1_hdl;
96 93 extern int add_avintr(void *intr_id, int lvl, avfunc xxintr, char *name,
97 94 int vect, caddr_t arg1, caddr_t arg2, uint64_t *, dev_info_t *);
98 95 extern int add_nmintr(int lvl, avfunc nmintr, char *name, caddr_t arg);
99 96 extern int add_avsoftintr(void *intr_id, int lvl, avfunc xxintr,
100 97 char *name, caddr_t arg1, caddr_t arg2);
101 98 extern int rem_avsoftintr(void *intr_id, int lvl, avfunc xxintr);
102 99 extern int av_softint_movepri(void *intr_id, int old_lvl);
103 100 extern void update_avsoftintr_args(void *intr_id, int lvl, caddr_t arg2);
104 101 extern void rem_avintr(void *intr_id, int lvl, avfunc xxintr, int vect);
105 102 extern void wait_till_seen(int ipl);
106 103 extern uint_t softlevel1(caddr_t, caddr_t);
107 104
108 105 #endif /* _KERNEL */
109 106
110 107 #ifdef __cplusplus
111 108 }
112 109 #endif
113 110
114 111 #endif /* _SYS_AVINTR_H */
↓ open down ↓ |
56 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX