I wanna use spin-lock to synchronize access to
structures(Doubly-Linked-List).
I wanna know how to use spin-lock.
Moreover, Let me know rules or restrictions in using spin-lock.
When an how must i use?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of mynam
Sent: Friday, September 19, 2003 8:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Spin-Lock
I’m making file-system-filter-drivers(FSFD).
I wanna use spin-lock to synchronize access to
structures(Doubly-Linked-List).
I wanna know how to use spin-lock.
Moreover, Let me know rules or restrictions in using spin-lock.
When an how must i use?
I hate to be rude, but there is an entire, huge, Fine Manual on this
subject. Have you read the docs on KeAcquireSpinLock?
Mailing lists like this should be for more advanced questions – stuff
you can’t find in the manuals, help on getting out of common design
problems that everyone seems to hit, etc. It shouldn’t be for obvious
stuff that just leaps out of the MSDN docs.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of mynam
Sent: Friday, September 19, 2003 11:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Spin-Lock
I’m making file-system-filter-drivers(FSFD).
I wanna use spin-lock to synchronize access to
structures(Doubly-Linked-List). I wanna know how to use spin-lock.
Moreover, Let me know rules or restrictions in using spin-lock. When an
how must i use?
KeAcquireSpinLock before accessing the protected data, KeReleaseSpinLock after
terminating the access. Note that on next call to KeAcquireSpinLock, the data
is in arbitrary state and any assumptions on it is not correct.
The restrictions are:
it is better to not grab several spinlocks one after another. But if you must
do this, do this always in the same order, otherwise, you will have a deadlock.
any code holding a spinlock runs on DISPATCH_LEVEL. It cannot be in the paged
code section, and it cannot access any pageable memory. It also has
restrictions on what OS routines can it call.
you must not call any routines beyound your module while holding a spinlock.
IoCallDriver and IoCompleteRequest are the usual ways to call out.
NdisMIndicateReceivePacket and NdisMIndicateStatus are others.
----- Original Message -----
From: “mynam” To: “Windows System Software Devs Interest List” Sent: Saturday, September 20, 2003 7:58 AM Subject: [ntdev] Spin-Lock
> I’m making file-system-filter-drivers(FSFD). > > I wanna use spin-lock to synchronize access to > structures(Doubly-Linked-List). > I wanna know how to use spin-lock. > Moreover, Let me know rules or restrictions in using spin-lock. > When an how must i use? > > Any answer’ll be great appreciated! > > Best regards. > mynam. > > — > 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