|
|
1.1 root 1: #ifndef __SYS_DDI_H__
2: #define __SYS_DDI_H__
3:
4: /*
5: * This header deals in removing macro definitions of functions in order to
6: * enhance the portablity of user driver binaries by removing dependencies
7: * on many system definitions such as structure lengths. Since many simple
8: * functions are implemented as macros to remove the source-level dependency
9: * while keeping performance, inclusion of the <sys/ddi.h> header indicates
10: * that the user wishes to make trade off speed and time against binary
11: * portability.
12: *
13: * Of course, many DDI/DKI functions exists to remove other dependences, such
14: * as on the size and offsets of structure *members*, and on the names and
15: * locations of data items. However, this header does not deal with defining
16: * prototype or anything else related to these aspects of the DDI/DKI
17: * specification, as they either involve changing source code to use these
18: * new functions or are old functions (defined in the headers related to the
19: * subsystem they were appropriated from) that have been elevated to DDI/DKI
20: * preferred status.
21: *
22: * Clients of this header *should* be using the new DDI/DKI functions so as
23: * to reduce dependency on system data structure layout, but here we deal
24: * with the simple transformation of macros to function calls, by subsystem.
25: */
26:
27:
28:
29: #ifdef __SYS_STREAM_H__
30:
31: /*
32: * Our client is also a client of the STREAMS subsystem; undefine macros that
33: * are functions under the DDI/DKI regime.
34: */
35:
36: #undef datamsg
37: #undef enableok
38: #undef noenable
39: #undef OTHERQ
40: #undef pcmsg
41: #undef putnext
42: #undef RD
43: #undef WR
44:
45: #endif /* defined (__SYS_STREAM_H__) */
46:
47:
48: #ifdef __KERNEL_STRMLIB_H__
49:
50: /*
51: * Our client is also using some of the STREAMS extras
52: */
53:
54: #undef W
55: #undef R
56:
57: #endif /* defined (__KERNEL_STRMLIB_H__) */
58:
59:
60: #ifdef __SYS_INLINE_H__
61:
62: /*
63: * Our client is also a client of the inline interrupt-level manipulation
64: * functions.
65: */
66:
67: #undef splbase
68: #undef spltimeout
69: #undef spldisk
70: #undef splstr
71: #undef splhi
72: #undef splx
73:
74: #undef splcmp
75: #undef splraise
76:
77: #endif /* defined (__SYS_INLINE_H__) */
78:
79:
80: #ifdef __KERNEL_V_TYPES_H__
81:
82: #undef btop
83: #undef btopr
84: #undef ptob
85:
86: #undef etoimajor
87: #undef getemajor
88: #undef geteminor
89: #undef getmajor
90: #undef getminor
91: #undef itoemajor
92: #undef makedevice
93:
94: #endif /* defined (__KERNEL_V_TYPES_H__) */
95:
96:
97: #ifdef __KERNEL_DDI_BASE_H__
98:
99: #undef ddi_base_data
100:
101: #endif /* defined (__KERNEL_DDI_BASE_H__) */
102:
103:
104: #ifdef __KERNEL_DDI_PROC_H__
105:
106: #undef ddi_proc_data
107:
108: #endif /* defined (__KERNEL_DDI_PROC_H__) */
109:
110:
111: #ifdef __KERNEL_DDI_CPU_H__
112:
113: #undef ddi_cpu_data
114:
115: #endif /* defined (__KERNEL_DDI_CPU_H__) */
116:
117:
118: #ifdef __KERNEL_DDI_GLOB_H__
119:
120: #undef ddi_glob_data
121:
122: #endif /* defined (__KERNEL_DDI_GLOB_H__) */
123:
124:
125: #ifdef __KERNEL_X86IO_H__
126:
127: /*
128: * Our client is also a client of the Intel 80x86 I/O instruction bindings.
129: *
130: * This stuff is normally defined as part of <sys/types.h> but we keep it
131: * in a separate header (which <sys/types.h> can pull in if necessary).
132: */
133:
134: #undef insb
135: #undef insl
136: #undef insw
137: #undef outb
138: #undef outl
139: #undef outw
140: #undef repinsb
141: #undef repinsd
142: #undef repinsw
143: #undef repoutsb
144: #undef repoutsd
145: #undef repoutsw
146:
147: #endif /* defined (__KERNEL_X86IO_H__) */
148:
149: #endif /* ! defined (__SYS_DDI_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.