As long as you do not have ANY execution threads that need to modify the
resource state at DISPATCH_LEVEL then you can use locks other than
spinlocks. Carefully read the IRQL requirements for your lock of choice.
IMHO the simplest and least restrictive lock is an event based lock.
=====================
Mark Roddy
From: Gil Mizrahi [mailto:xxxxx@Gntsteps.com]
Sent: Monday, May 17, 2004 2:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Spin Locks
Hi,
If I have a code that runs in passive level and I want to protect some
resources. Do I have to use Spin Lock? Is it possible to use Mutex or Fast
Mutex instead?
Thanks,
Gil.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Please read these:
http://www.microsoft.com/whdc/driver/kernel/IRQL.mspx
http://www.microsoft.com/whdc/driver/kernel/locks.mspx
They will probably help.
–
Jake Oshins
Windows Kernel Group
This posting is provided “AS IS” with no warranties, and confers no rights.
“Gil Mizrahi” wrote in message news:xxxxx@ntdev…
Hi,
If I have a code that runs in passive level and I want to protect some
resources. Do I have to use Spin Lock? Is it possible to use Mutex or Fast
Mutex instead?
Thanks,
Gil.
If the resources will never be accessed on DISPATCH_LEVEL - then use fast mutex. Otherwise, spinlock is your only option.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Gil Mizrahi
To: Windows System Software Devs Interest List
Sent: Monday, May 17, 2004 10:48 PM
Subject: [ntdev] Spin Locks
Hi,
If I have a code that runs in passive level and I want to protect some resources. Do I have to use Spin Lock? Is it possible to use Mutex or Fast Mutex instead?
Thanks,
Gil.
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com