Added definition of macro scst_assert_activity_suspended().

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2010-12-16 13:10:09 +00:00
parent 8797dbd533
commit 6028abbb99
2 changed files with 8 additions and 1 deletions

View File

@@ -3685,6 +3685,13 @@ static inline int cancel_delayed_work_sync(struct work_struct *work)
}
#endif
#ifdef CONFIG_DEBUG_LOCK_ALLOC
extern struct lockdep_map scst_suspend_dep_map;
#define scst_assert_activity_suspended() \
WARN_ON(debug_locks && !lock_is_held(&scst_suspend_dep_map));
#else
#define scst_assert_activity_suspended() do { } while (0)
#endif
int scst_suspend_activity(bool interruptible);
void scst_resume_activity(void);

View File

@@ -149,7 +149,7 @@ wait_queue_head_t scst_dev_cmd_waitQ;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
#ifdef CONFIG_LOCKDEP
static struct lock_class_key scst_suspend_key;
static struct lockdep_map scst_suspend_dep_map =
struct lockdep_map scst_suspend_dep_map =
STATIC_LOCKDEP_MAP_INIT("scst_suspend_activity", &scst_suspend_key);
#endif
#endif