ReactOS  0.4.14-dev-1034-g1e60116
spinlock.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS HAL
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: hal/halppc/generic/spinlock.c
5  * PURPOSE: Spinlock and Queued Spinlock Support
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <hal.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 #undef KeAcquireSpinLock
16 #undef KeReleaseSpinLock
17 #undef KeLowerIrql
18 #undef KeRaiseIrql
19 
20 
23 
26 
27 /* FUNCTIONS *****************************************************************/
28 
29 /*
30  * @implemented
31  */
32 VOID
33 NTAPI
35 {
36  /* Call the fastcall function */
38 }
39 
40 /*
41  * @implemented
42  */
44 KIRQL
45 NTAPI
48 {
49  /* Call the fastcall function */
50  return *OldIrql = KfRaiseIrql(NewIrql);
51 }
52 
53 /*
54  * @implemented
55  */
56 VOID
57 NTAPI
60 {
61  /* Call the fastcall function */
63 }
64 
65 /*
66  * @implemented
67  */
68 KIRQL
71 {
72  /* Simply raise to dispatch */
74 }
75 
76 /*
77  * @implemented
78  */
79 VOID
80 NTAPI
82  KIRQL NewIrql)
83 {
84  /* Call the fastcall function */
86 }
87 
88 /*
89  * @implemented
90  */
91 KIRQL
94 {
95  /* Simply raise to dispatch */
97 }
98 
99 /*
100  * @implemented
101  */
102 VOID
103 FASTCALL
105  KIRQL OldIrql)
106 {
107  /* Simply lower IRQL back */
109 }
110 
111 /*
112  * @implemented
113  */
114 KIRQL
115 FASTCALL
117 {
118  /* Simply raise to dispatch */
119  return KfRaiseIrql(DISPATCH_LEVEL);
120 }
121 
122 /*
123  * @implemented
124  */
125 KIRQL
126 FASTCALL
128 {
129  /* Simply raise to dispatch */
130  return KfRaiseIrql(DISPATCH_LEVEL);
131 }
132 
133 /*
134  * @implemented
135  */
136 VOID
137 FASTCALL
140 {
141  /* Simply raise to dispatch */
143 }
144 
145 /*
146  * @implemented
147  */
148 VOID
149 FASTCALL
152 {
153  /* Simply raise to synch */
155 }
156 
157 /*
158  * @implemented
159  */
160 VOID
161 FASTCALL
163  IN KIRQL OldIrql)
164 {
165  /* Simply lower IRQL back */
167 }
168 
169 /*
170  * @implemented
171  */
172 VOID
173 FASTCALL
175 {
176  /* Simply lower IRQL back */
178 }
179 
180 /*
181  * @implemented
182  */
183 BOOLEAN
184 FASTCALL
186  IN PKIRQL OldIrql)
187 {
188  /* Simply raise to dispatch */
190 
191  /* Always return true on UP Machines */
192  return TRUE;
193 }
194 
195 /*
196  * @implemented
197  */
198 LOGICAL
199 FASTCALL
202 {
203  /* Simply raise to dispatch */
205 
206  /* Always return true on UP Machines */
207  return TRUE;
208 }
209 
210 /* EOF */
BOOLEAN FASTCALL KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, IN PKIRQL OldIrql)
Definition: spinlock.c:177
VOID FASTCALL KeAcquireInStackQueuedSpinLockRaiseToSynch(IN PKSPIN_LOCK SpinLock, IN PKLOCK_QUEUE_HANDLE LockHandle)
Definition: spinlock.c:142
#define IN
Definition: typedefs.h:39
#define TRUE
Definition: types.h:120
VOID NTAPI KeAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL OldIrql)
Definition: spinlock.c:50
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
VOID FASTCALL KeAcquireInStackQueuedSpinLock(IN PKSPIN_LOCK SpinLock, IN PKLOCK_QUEUE_HANDLE LockHandle)
Definition: spinlock.c:130
#define FASTCALL
Definition: nt_native.h:50
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
UCHAR KIRQL
Definition: env_spec_w32.h:591
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
LOGICAL FASTCALL KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, OUT PKIRQL OldIrql)
Definition: spinlock.c:192
KIRQL FASTCALL KfRaiseIrql(KIRQL NewIrql)
Definition: irql.c:243
unsigned char BOOLEAN
#define NTKERNELAPI
VOID FASTCALL KfLowerIrql(KIRQL NewIrql)
Definition: irql.c:210
VOID FASTCALL KeReleaseInStackQueuedSpinLock(IN PKLOCK_QUEUE_HANDLE LockHandle)
Definition: spinlock.c:166
VOID FASTCALL KfReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL OldIrql)
Definition: spinlock.c:96
VOID FASTCALL KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, IN KIRQL OldIrql)
Definition: spinlock.c:154
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:790
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
#define SYNCH_LEVEL
Definition: env_spec_w32.h:704
KIRQL FASTCALL KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
Definition: spinlock.c:108
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
enum _KSPIN_LOCK_QUEUE_NUMBER KSPIN_LOCK_QUEUE_NUMBER
VOID NTAPI KeRaiseIrql(KIRQL NewIrql, PKIRQL OldIrql)
Definition: spinlock.c:27
VOID NTAPI KeReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL NewIrql)
Definition: spinlock.c:73
KIRQL FASTCALL KeAcquireSpinLockRaiseToSynch(PKSPIN_LOCK SpinLock)
Definition: spinlock.c:62
#define OUT
Definition: typedefs.h:40
KIRQL FASTCALL KfAcquireSpinLock(PKSPIN_LOCK SpinLock)
Definition: spinlock.c:85
*LockHandle LockHandle _Out_ PKLOCK_QUEUE_HANDLE LockHandle
Definition: kefuncs.h:729
VOID NTAPI KeLowerIrql(KIRQL NewIrql)
Definition: spinlock.c:39
KIRQL FASTCALL KeAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
Definition: spinlock.c:119
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _In_ _IRQL_restores_ KIRQL NewIrql
Definition: ke.h:114