cancel spinlock

I’m now working on developing serial port driver for a mutiport board for WindowsXP. I see that the source code supplied by DDK(2505) acqures many times (32) cancel spin lock. It uses it for queue management to shared data synchronization. While Microsoft recommends not to use cancel spinlock unless absolutely necessary then the supplied source code uses this for many cheap uses which can be avoided. Does it mean that Microsoft has stopped updating source code for serial driver? Has anybody come across that source code and has something different to tell me?

Regards,
Hakim


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The source code in the DDK is in sync with the code that is used to
build the binary for the system. The queuing and cancel logic in serial
is left over from NT4.0. This was never touched as everything worked
fine. Anyway, I will pass your concern to the developers and see if they
address this issue for the next release.
Please also note that we have introduced 4 new APIs (IoCsqXXX) on XP to
simplify queuing and cancel logic without using global cancel spinlock.
Those who have done that know how horrendous this logic is. There is a
sample in the XP DDK (src\general\cancel) that shows how to use these
APIs.
?
Another cool thing is that we have also provided a new header file
(csq.h) and a static lib to facilitate the usage of these APIs on Win2K.
In order to build your driver for Win2K, you can either use the XP Win2K
build environment or copy the header and library from XP to Win2K DDK.
The cancel sample’s ‘sources’ file on XP DDK (build 2526 and later) has
information on how to build drivers for Win2K.
?
-Eliyas
?
-----Original Message-----
From: Hasan Jamal [mailto:xxxxx@connecttech.com]
Sent: Monday, July 30, 2001 12:21 PM
To: NT Developers Interest List
Subject: [ntdev] cancel spinlock
?
I’m now working on developing serial port driver for a mutiport board
for WindowsXP. I see that the source code supplied by DDK(2505)
acqures?many times (32) cancel spin lock. It uses it for queue
management to shared data synchronization. While Microsoft recommends
not to use cancel spinlock unless absolutely necessary then?the supplied
source code uses this for?many cheap uses which can be avoided. Does it
mean that Microsoft has stopped updating source code for serial driver?
Has anybody come across that source code and has something different to
tell me?
?
Regards,
Hakim

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com