From 999443243bb79cabb659f5cbe6718ab9d4d7f677 Mon Sep 17 00:00:00 2001 From: tzachid Date: Tue, 17 Nov 2009 12:49:32 +0000 Subject: [PATCH] [eth] Add temporarily code for tracking shutter behavior. signed off by: Firas Mahamid git-svn-id: svn://openib.tc.cornell.edu/gen1@2571 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/hw/mlx4/kernel/inc/shutter.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trunk/hw/mlx4/kernel/inc/shutter.h b/trunk/hw/mlx4/kernel/inc/shutter.h index fcecb3dc..467bea83 100644 --- a/trunk/hw/mlx4/kernel/inc/shutter.h +++ b/trunk/hw/mlx4/kernel/inc/shutter.h @@ -105,11 +105,15 @@ static inline void shutter_shut(shutter_t * p_shutter) if (res) // We are now waiting for the object to reach -MAX_OPERATIONS KeWaitForSingleObject( &p_shutter->event, Executive, KernelMode, FALSE, NULL ); + + ASSERT(p_shutter->cnt == -MAX_OPERATIONS); } static inline void shutter_alive(shutter_t * p_shutter) { long res = 0; + long old_cnt = 0; + old_cnt = p_shutter->cnt; ASSERT(p_shutter->cnt == -MAX_OPERATIONS); // Mark the counter as locked res = InterlockedExchangeAdd(&p_shutter->cnt, MAX_OPERATIONS); -- 2.46.0