- Implement KeTestSpinLock.

svn path=/trunk/; revision=40284
This commit is contained in:
Aleksey Bragin 2009-03-29 12:57:58 +00:00
parent d32512662f
commit fea868eebc
2 changed files with 20 additions and 3 deletions

View file

@ -5791,6 +5791,13 @@ KeTryToAcquireSpinLockAtDpcLevel(
IN OUT PKSPIN_LOCK SpinLock
);
NTKERNELAPI
BOOLEAN
FASTCALL
KeTestSpinLock(
IN PKSPIN_LOCK SpinLock
);
#if defined (_X86_)
NTKERNELAPI

View file

@ -305,14 +305,24 @@ KeReleaseInStackQueuedSpinLockForDpc(IN PKLOCK_QUEUE_HANDLE LockHandle)
}
/*
* @unimplemented
* @implemented
*/
BOOLEAN
FASTCALL
KeTestSpinLock(IN PKSPIN_LOCK SpinLock)
{
UNIMPLEMENTED;
return FALSE;
/* Test this spinlock */
if (*SpinLock)
{
/* Spinlock is busy, yield execution */
YieldProcessor();
/* Return busy flag */
return FALSE;
}
/* Spinlock appears to be free */
return TRUE;
}
/* EOF */