5 #ifdef V3_CONFIG_DEBUG_LOCKS
7 // Maxmimum number of locks to handle
9 // Maximum number of locks that can be simultaneously
11 #define LOCK_STACK_DEPTH 16
14 // The following macros are used
15 // in the stub functions to call back to the lock
16 // checker - if lock checking is not enabled, these
19 #define LOCKCHECK_INIT() palacios_lockcheck_init()
20 #define LOCKCHECK_ALLOC(lock) palacios_lockcheck_alloc(lock)
21 #define LOCKCHECK_FREE(lock) palacios_lockcheck_free(lock)
22 #define LOCKCHECK_LOCK(lock) palacios_lockcheck_lock(lock)
23 #define LOCKCHECK_UNLOCK(lock) palacios_lockcheck_unlock(lock)
24 #define LOCKCHECK_LOCK_IRQSAVE(lock, flags) palacios_lockcheck_lock_irqsave(lock,flags)
25 #define LOCKCHECK_UNLOCK_IRQRESTORE(lock, flags) palacios_lockcheck_unlock_irqrestore(lock,flags)
26 #define LOCKCHECK_DEINIT() palacios_lockcheck_deinit()
28 void palacios_lockcheck_init(void);
29 void palacios_lockcheck_alloc(void *lock);
30 void palacios_lockcheck_free(void *lock);
31 void palacios_lockcheck_lock(void *lock);
32 void palacios_lockcheck_unlock(void *lock);
33 void palacios_lockcheck_lock_irqsave(void *lock,unsigned long flags);
34 void palacios_lockcheck_unlock_irqrestore(void *lock,unsigned long flags);
35 void palacios_lockcheck_deinit(void);
40 // The following is what happens when lock checking is not on
42 #define LOCKCHECK_INIT()
43 #define LOCKCHECK_ALLOC(lock)
44 #define LOCKCHECK_FREE(lock)
45 #define LOCKCHECK_LOCK(lock)
46 #define LOCKCHECK_UNLOCK(lock)
47 #define LOCKCHECK_LOCK_IRQSAVE(lock, flags)
48 #define LOCKCHECK_UNLOCK_IRQRESTORE(lock, flags)
49 #define LOCKCHECK_DEINIT()