Cleanup isn't necessary after calling the driver in NtQueryDirectoryFile.
[reactos.git] / reactos / ntoskrnl / rtl / regio.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/rtl/regio.c
6 * PURPOSE: Register io functions
7 *
8 * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de)
9 */
10
11 #include <ntoskrnl.h>
12
13
14 /* FUNCTIONS ***************************************************************/
15
16 UCHAR
17 STDCALL
18 READ_REGISTER_UCHAR (
19 PUCHAR Register
20 )
21 {
22 return *Register;
23 }
24
25 /*
26 * @implemented
27 */
28 USHORT
29 STDCALL
30 READ_REGISTER_USHORT (
31 PUSHORT Register
32 )
33 {
34 return *Register;
35 }
36
37 /*
38 * @implemented
39 */
40 ULONG
41 STDCALL
42 READ_REGISTER_ULONG (
43 PULONG Register
44 )
45 {
46 return *Register;
47 }
48
49 /*
50 * @implemented
51 */
52 VOID
53 STDCALL
54 READ_REGISTER_BUFFER_UCHAR (
55 PUCHAR Register,
56 PUCHAR Buffer,
57 ULONG Count
58 )
59 {
60 while (Count--)
61 {
62 *Buffer++ = *Register++;
63 }
64 }
65
66 /*
67 * @implemented
68 */
69 VOID
70 STDCALL
71 READ_REGISTER_BUFFER_USHORT (
72 PUSHORT Register,
73 PUSHORT Buffer,
74 ULONG Count
75 )
76 {
77 while (Count--)
78 {
79 *Buffer++ = *Register++;
80 }
81 }
82
83 /*
84 * @implemented
85 */
86 VOID
87 STDCALL
88 READ_REGISTER_BUFFER_ULONG (
89 PULONG Register,
90 PULONG Buffer,
91 ULONG Count
92 )
93 {
94 while (Count--)
95 {
96 *Buffer++ = *Register++;
97 }
98 }
99
100 /*
101 * @implemented
102 */
103 VOID
104 STDCALL
105 WRITE_REGISTER_UCHAR (
106 PUCHAR Register,
107 UCHAR Value
108 )
109 {
110 *Register = Value;
111 }
112
113 /*
114 * @implemented
115 */
116 VOID
117 STDCALL
118 WRITE_REGISTER_USHORT (
119 PUSHORT Register,
120 USHORT Value
121 )
122 {
123 *Register = Value;
124 }
125
126 /*
127 * @implemented
128 */
129 VOID
130 STDCALL
131 WRITE_REGISTER_ULONG (
132 PULONG Register,
133 ULONG Value
134 )
135 {
136 *Register = Value;
137 }
138
139 /*
140 * @implemented
141 */
142 VOID
143 STDCALL
144 WRITE_REGISTER_BUFFER_UCHAR (
145 PUCHAR Register,
146 PUCHAR Buffer,
147 ULONG Count
148 )
149 {
150 while (Count--)
151 {
152 *Register++ = *Buffer++;
153 }
154 }
155
156 /*
157 * @implemented
158 */
159 VOID
160 STDCALL
161 WRITE_REGISTER_BUFFER_USHORT (
162 PUSHORT Register,
163 PUSHORT Buffer,
164 ULONG Count
165 )
166 {
167 while (Count--)
168 {
169 *Register++ = *Buffer++;
170 }
171 }
172
173 /*
174 * @implemented
175 */
176 VOID
177 STDCALL
178 WRITE_REGISTER_BUFFER_ULONG (
179 PULONG Register,
180 PULONG Buffer,
181 ULONG Count
182 )
183 {
184 while (Count--)
185 {
186 *Register++ = *Buffer++;
187 }
188 }
189
190 /* EOF */