Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
/*++
Module Name:
i64lock.c copied from ixlock.asm
Abstract:
This module contains the lock routines.
Author:
Bernard Lint, M. Jayakumar
Revision History:
Bernard Lint 6-Jun-1995: IA64 version based on MIPS version. Todd Kjos 1-Jun-1998: Added versions of HighLevelLock services.
--*/
#include "halp.h"
ULONG HalpAcquireHighLevelLock ( PKSPIN_LOCK Lock )
/*++
Routine Description:
Turns off interrupts and acquires a spinlock. Note: Interrupts MUST be enabled on entry.
Arguments:
Lock to acquire
Return Value:
Previous IRQL
--*/
{ BOOLEAN Enabled; KIRQL OldLevel;
ASSERT(sizeof(ULONG) >= sizeof(KIRQL)); KeRaiseIrql(HIGH_LEVEL, &OldLevel); Enabled = HalpDisableInterrupts(); ASSERT(Enabled); KiAcquireSpinLock(Lock); return((ULONG)OldLevel); }
VOID HalpReleaseHighLevelLock ( PKSPIN_LOCK Lock, ULONG OldLevel ) /*++
Routine Description:
Releases a spinlock and turns interrupts back on
Arguments:
Lock - Lock to release OldLevel - Context returned by HalpAcquireHighLevelLock
Return Value:
None
--*/
/*++
Routine Description:
Arguments:
Return Value:
--*/
{ KiReleaseSpinLock(Lock); HalpEnableInterrupts(); KeLowerIrql((KIRQL)OldLevel);
}
VOID HalpSerialize ( )
/*++
Routine Description:
Arguements:
Return Value:
--*/ { return; }
|