ReactOS  0.4.14-dev-1034-g1e60116
spinlock.c File Reference
#include <hal.h>
#include <debug.h>
#include <internal/spinlock.h>
Include dependency graph for spinlock.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI HalpAcquireCmosSpinLock (VOID)
 
VOID NTAPI HalpReleaseCmosSpinLock (VOID)
 

Variables

ULONG_PTR HalpSystemHardwareFlags
 
KSPIN_LOCK HalpSystemHardwareLock
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file spinlock.c.

Function Documentation

◆ HalpAcquireCmosSpinLock()

VOID NTAPI HalpAcquireCmosSpinLock ( VOID  )

Definition at line 227 of file spinlock.c.

228 {
230 
231  /* Get flags and disable interrupts */
232  Flags = __readeflags();
233  _disable();
234 
235  /* Acquire the lock */
237 
238  /* We have the lock, save the flags now */
240 }
uint32_t ULONG_PTR
Definition: typedefs.h:64
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
__INTRIN_INLINE uintptr_t __readeflags(void)
Definition: intrin_x86.h:1555
FORCEINLINE VOID KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.h:20
ULONG_PTR HalpSystemHardwareFlags
Definition: spinlock.c:24
KSPIN_LOCK HalpSystemHardwareLock
Definition: spinlock.c:25
void __cdecl _disable(void)
Definition: intrin_arm.h:365

Referenced by HalGetEnvironmentVariable(), HalMakeBeep(), HalpGetCmosData(), HalpInitializeClock(), HalpReboot(), HalpSetCmosData(), HalQueryRealTimeClock(), HalSetEnvironmentVariable(), HalSetRealTimeClock(), HalStartProfileInterrupt(), HalStopProfileInterrupt(), and RtcSetClockRate().

◆ HalpReleaseCmosSpinLock()

VOID NTAPI HalpReleaseCmosSpinLock ( VOID  )

Definition at line 244 of file spinlock.c.

245 {
247 
248  /* Get the flags */
250 
251  /* Release the lock */
253 
254  /* Restore the flags */
256 }
FORCEINLINE VOID KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.h:35
uint32_t ULONG_PTR
Definition: typedefs.h:64
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
ULONG_PTR HalpSystemHardwareFlags
Definition: spinlock.c:24
KSPIN_LOCK HalpSystemHardwareLock
Definition: spinlock.c:25
__INTRIN_INLINE void __writeeflags(uintptr_t Value)
Definition: intrin_x86.h:1550

Referenced by HalGetEnvironmentVariable(), HalMakeBeep(), HalpGetCmosData(), HalpInitializeClock(), HalpSetCmosData(), HalQueryRealTimeClock(), HalSetEnvironmentVariable(), HalSetRealTimeClock(), HalStartProfileInterrupt(), HalStopProfileInterrupt(), and RtcSetClockRate().

Variable Documentation

◆ HalpSystemHardwareFlags

ULONG_PTR HalpSystemHardwareFlags

Definition at line 24 of file spinlock.c.

Referenced by HalpAcquireCmosSpinLock(), and HalpReleaseCmosSpinLock().

◆ HalpSystemHardwareLock

KSPIN_LOCK HalpSystemHardwareLock

Definition at line 25 of file spinlock.c.

Referenced by HalpAcquireCmosSpinLock(), and HalpReleaseCmosSpinLock().