aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/rwsem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/rwsem.h')
-rw-r--r--include/asm-ppc64/rwsem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-ppc64/rwsem.h b/include/asm-ppc64/rwsem.h
index bd5c2f0935753..7a647fae3765b 100644
--- a/include/asm-ppc64/rwsem.h
+++ b/include/asm-ppc64/rwsem.h
@@ -163,5 +163,10 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
return atomic_add_return(delta, (atomic_t *)(&sem->count));
}
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+ return (sem->count != 0);
+}
+
#endif /* __KERNEL__ */
#endif /* _PPC_RWSEM_XADD_H */