[ofw] cl_spinlock_osd.h
Fab Tillier
ftillier at microsoft.com
Wed Apr 10 10:30:41 PDT 2013
Is there similar logic for the release case?
Anyway, this looks good to me. It would be great to move away from complib altogether (at least in the kernel drivers).
Cheers,
-Fab
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Smith, Stan
Sent: Tuesday, April 9, 2013 4:25 PM
To: ofw at lists.openfabrics.org
Subject: [ofw] cl_spinlock_osd.h
Remove code which is duplicated in the implementation of MS code KeAcquireSpinLock(), as indicated by our Microsoft OFA members.
Signed-off-by: stan.smith at intel.com
--- inc/kernel/complib/cl_spinlock_osd.h Wed Mar 06 10:12:19 2013
+++ inc/kernel/complib/cl_spinlock_osd.h Tue Feb 26 12:08:56 2013
@@ -91,15 +91,8 @@
cl_spinlock_acquire(
IN cl_spinlock_t* const p_spinlock )
{
- KIRQL irql = KeGetCurrentIrql();
CL_ASSERT( p_spinlock );
-
- if (irql == DISPATCH_LEVEL) {
- KeAcquireSpinLockAtDpcLevel( &p_spinlock->lock );
- p_spinlock->irql = irql;
- }
- else
- KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );
+ KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );
}
Basically move from
CL_INLINE void
cl_spinlock_acquire(
IN cl_spinlock_t* const p_spinlock )
{
KIRQL irql = KeGetCurrentIrql();
CL_ASSERT( p_spinlock );
if (irql == DISPATCH_LEVEL) {
KeAcquireSpinLockAtDpcLevel( &p_spinlock->lock );
p_spinlock->irql = irql;
}
else
KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );
}
To
CL_INLINE void
cl_spinlock_acquire(
IN cl_spinlock_t* const p_spinlock )
{
CL_ASSERT( p_spinlock );
KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );
}
More information about the ofw
mailing list