Re: does NdisAcquireSpinLock work properly in 2000 &9- 8?

Almost, Satish. The multi-processor kernel uses 'LOCK BTS DWORD PTR [reg],
0" to test and set the bit.

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@Broadstor.com
xxxxx@inland.net

-----Original Message-----
From: Satish [mailto:xxxxx@aalayance.com]
Sent: Saturday, May 26, 2001 12:18 AM
To: NT Developers Interest List
Subject: [ntdev] Re: does NdisAcquireSpinLock work properly in 2000 &98?

I am thinking that if a spinlock is acquired , then no one else can
acquire
the same spinlock untill it is been released so that
the spinlock acquired thread can access the shared resource
explicitly or can execute critical code. And I think trying to acquire a
already acquired spinlock makes the taker to wait untill
its been released.

If the above concept doesnt work in uniprocessor , how
shared resources are protected and how critical sections
are executed ?

In UniProcessor it raises only IRQL to DISPATCH_LEVEL. Thread Switching dont
work. U can execute ur critical section code at this time. In MP real
hardware atomic operation will happen using Instruction BTS ( Bit Test and
Set ).

Regards,
Satish K.S


You are currently subscribed to ntdev as: xxxxx@broadstor.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