Re: Help me for a typical problem regarding KeAquireSpinLock which is not Locking other Thread in Same CPU
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Tue, 25 Apr 2006 07:19:19 -0400
Once you have acquired a spin lock you are running at DISPATCH_LEVEL and no
other thread can run on that CPU, so you are somehow lowering IRQL to below
DISPATCH_LEVEL, by either KeLowerIrql (or KeRaiseIrql) or by releasing the
spinlock.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Rohit" <rksindhu@xxxxxxxxx> wrote in message
news:1145960832.896349.226200@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I have a typical problem regarding KeAquireSpinLock which is not
Blocking other Threads in Same CPU.
The Scenario is I've created 2 threads and in the first thread i call
KeAquireSpinLock to the same global KSPIN_LOCK variable, while its
locked by the first thread which is running the critical section, i
call the same lock in the second thread, and that also gets the lock
and starts running the critical section.
Ideally when first thread has got the lock second should wait, right?
In other words in a Single CPU Scenario a SpinLock should work like a
simple Mutex, right?? Or i'm mistaken, it doen't work at all in case of
Single CPU??
Or is it like, when one thread has got the Lock, means jumped to
Dispatch Level, other Threads will simply remain blocked??
Whatever be the Reason when Thread 1 has got the lock and thread 2 in
same CPU tries to get the same lock is not blocking untill the first
Thread releases it?? Am i doing something worng??
please Help me out, SpinLock is a new topic for me...
thanks and waiting for reply,
Rohit
.
- Follow-Ups:
- References:
- Prev by Date: The WDM Video Capture Driver causes reboot problem with Windows XP
- Next by Date: Re: Help me for a typical problem regarding KeAquireSpinLock which is not Locking other Thread in Same CPU
- Previous by thread: Re: Help me for a typical problem regarding KeAquireSpinLock which is not Locking other Thread in Same CPU
- Next by thread: Re: Help me for a typical problem regarding KeAquireSpinLock which is not Locking other Thread in Same CPU
- Index(es):
Relevant Pages
|