[ofw] cl_spinlock_osd.h

Smith, Stan stan.smith at intel.com
Tue Apr 9 16:24:35 PDT 2013


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 );
}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130409/1306b7d8/attachment.html>


More information about the ofw mailing list