regd spinlocks

hi,
can a context switch on a cpu happen, while a spin lock is held at
that cpu…?

chaitanya

No. Acquiring a spin lock raises to IRQL DISPATCH_LEVEL (or above) and thus
disables preemption.

Regards,

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Bhaava Chaitanya Kancherla [mailto:xxxxx@cmcltd.com]
Sent: Monday, August 28, 2000 7:26 AM
To: NT Developers Interest List
Subject: [ntdev] regd spinlocks

hi,
can a context switch on a cpu happen, while a spin lock is held at
that cpu…?

chaitanya


You are currently subscribed to ntdev as: xxxxx@osr.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

No.
Holding ANY spinlock means that the CPU is at >= DISPATCH_LEVEL - context
switches are prohibited on such IRQL.
(context switch while holding a spinlock is a disaster anyway. So, the OS
has the mechanism - DISPATCH_LEVEL - to prevent this).

Max

----- Original Message -----
From: Bhaava Chaitanya Kancherla
To: NT Developers Interest List
Sent: Monday, August 28, 2000 3:26 PM
Subject: [ntdev] regd spinlocks

> hi,
> can a context switch on a cpu happen, while a spin lock is held at
> that cpu…?
>
> chaitanya
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>