summaryrefslogtreecommitdiff
path: root/include/linux/rwsem-spinlock.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 09:58:18 +0300
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 09:58:18 +0300
commitf0612bbc41f65f5a684f69d714a1a17a6f0f40c5 (patch)
tree8c070070bb355843cfa4635643e9da7c2c4cd44a /include/linux/rwsem-spinlock.h
parentb0c4e148bd591629749d02a8fbc8d81c26d548cf (diff)
parent81cfb8864c73230eb1c37753aba517db15cf4d8f (diff)
downloadlinux-f0612bbc41f65f5a684f69d714a1a17a6f0f40c5.tar.xz
Merge branch 'upstream'
Diffstat (limited to 'include/linux/rwsem-spinlock.h')
-rw-r--r--include/linux/rwsem-spinlock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h
index b52a2af25f1f..f30f805080ae 100644
--- a/include/linux/rwsem-spinlock.h
+++ b/include/linux/rwsem-spinlock.h
@@ -61,5 +61,10 @@ extern void FASTCALL(__up_read(struct rw_semaphore *sem));
extern void FASTCALL(__up_write(struct rw_semaphore *sem));
extern void FASTCALL(__downgrade_write(struct rw_semaphore *sem));
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+ return (sem->activity != 0);
+}
+
#endif /* __KERNEL__ */
#endif /* _LINUX_RWSEM_SPINLOCK_H */