diff --git a/libcfs/include/libcfs/linux/linux-lock.h b/libcfs/include/libcfs/linux/linux-lock.h index 701c3fc8d9c50087326333efc55ba6526635dc31..ddc679013d61b376c78e1a8193882f7b23fb26cb 100644 --- a/libcfs/include/libcfs/linux/linux-lock.h +++ b/libcfs/include/libcfs/linux/linux-lock.h @@ -162,6 +162,16 @@ struct lock_class_key { do { (void)sizeof (lock);(void)sizeof (key); } while (0) /* This has to be a macro, so that `subclass' can be undefined in kernels that * do not support lockdep. */ + + +static inline void lockdep_off(void) +{ +} + +static inline void lockdep_on(void) +{ +} + #endif /* lockdep_set_class */ #ifndef CONFIG_DEBUG_LOCK_ALLOC diff --git a/libcfs/include/libcfs/user-lock.h b/libcfs/include/libcfs/user-lock.h index 9ace41ec9b7f89c6f5c223cd7a57bce88a1c4b83..c81c2084528bde8a5594681f195094f011ce27f5 100644 --- a/libcfs/include/libcfs/user-lock.h +++ b/libcfs/include/libcfs/user-lock.h @@ -357,6 +357,14 @@ static inline void lockdep_set_class(void *lock, struct lock_class_key *key) { } +static inline void lockdep_off(void) +{ +} + +static inline void lockdep_on(void) +{ +} + /* This has to be a macro, so that can be undefined in kernels that do not * support lockdep. */ #define mutex_lock_nested(mutex, subclass) mutex_lock(mutex) @@ -364,6 +372,7 @@ static inline void lockdep_set_class(void *lock, struct lock_class_key *key) #define down_read_nested(lock, subclass) down_read(lock) #define down_write_nested(lock, subclass) down_write(lock) + /* !__KERNEL__ */ #endif diff --git a/libcfs/include/libcfs/winnt/winnt-lock.h b/libcfs/include/libcfs/winnt/winnt-lock.h index 0b6bac5ddc6328389008e1e842ef6a3c39fef9ea..4c96a3eb4549d2866744467a7c2242209dea3aa2 100644 --- a/libcfs/include/libcfs/winnt/winnt-lock.h +++ b/libcfs/include/libcfs/winnt/winnt-lock.h @@ -109,7 +109,7 @@ typedef KEVENT event_t; * Return Value: * N/A * - * Notes: + * Notes: * N/A */ static inline void @@ -134,7 +134,7 @@ static inline void * Zero: waiting timeouts * Non Zero: event signaled ... * - * Notes: + * Notes: * N/A */ @@ -171,7 +171,7 @@ cfs_wait_event_internal(event_t * event, int64_t timeout) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -191,7 +191,7 @@ cfs_wake_event(event_t * event) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -209,7 +209,7 @@ cfs_clear_event(event_t * event) * Warning: * * for spinlock operations, try to grab nesting acquisition of - * spinlock will cause dead-lock in MP system and current irql + * spinlock will cause dead-lock in MP system and current irql * overwritten for UP system. (UP system could allow nesting spin * acqisition, because it's not spin at all just raising the irql.) * @@ -335,7 +335,7 @@ typedef struct rw_semaphore { * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -355,7 +355,7 @@ static inline void init_rwsem(rw_semaphore_t *s) * Return Value: * N/A * - * Notes: + * Notes: * For winnt system, we need this routine to delete the ERESOURCE. * Just define it NULL for other systems. */ @@ -376,7 +376,7 @@ static inline void fini_rwsem(rw_semaphore_t *s) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -398,7 +398,7 @@ static inline void down_read(struct rw_semaphore *s) * Zero: failed to acquire the read lock * Non-Zero: succeeded to acquire the read lock * - * Notes: + * Notes: * This routine will return immediately without waiting. */ @@ -418,7 +418,7 @@ static inline int down_read_trylock(struct rw_semaphore *s) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -439,7 +439,7 @@ static inline void down_write(struct rw_semaphore *s) * Zero: failed to acquire the write lock * Non-Zero: succeeded to acquire the read lock * - * Notes: + * Notes: * This routine will return immediately without waiting. */ @@ -459,7 +459,7 @@ static inline int down_write_trylock(struct rw_semaphore *s) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -481,7 +481,7 @@ static inline void up_read(struct rw_semaphore *s) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -526,6 +526,14 @@ void write_unlock(rwlock_t * rwlock); struct lock_class_key {int foo;}; #define lockdep_set_class(lock, class) do {} while(0) +static inline void lockdep_off(void) +{ +} + +static inline void lockdep_on(void) +{ +} + /* * Semaphore * @@ -592,7 +600,7 @@ typedef struct semaphore mutex_t; * Return Value: * N/A * - * Notes: + * Notes: * N/A */ #define mutex_init init_mutex @@ -612,7 +620,7 @@ static inline void init_mutex(mutex_t *mutex) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -636,7 +644,7 @@ static inline void mutex_down(mutex_t *mutex) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -658,7 +666,7 @@ static inline void mutex_up(mutex_t *mutex) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -697,7 +705,7 @@ struct completion { * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -717,7 +725,7 @@ static inline void init_completion(struct completion *c) * Return Value: * N/A * - * Notes: + * Notes: * N/A */ @@ -737,7 +745,7 @@ static inline void complete(struct completion *c) * Return Value: * N/A * - * Notes: + * Notes: * N/A */