X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sh%2Frwsem.h;fp=include%2Fasm-sh%2Frwsem.h;h=0262d3d1e5e018a2ddb9e7913d48124eb4311a4e;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=1be4337f525950d795d1a28c945898d20154a1e8;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/include/asm-sh/rwsem.h b/include/asm-sh/rwsem.h index 1be4337f5..0262d3d1e 100644 --- a/include/asm-sh/rwsem.h +++ b/include/asm-sh/rwsem.h @@ -166,5 +166,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 /* _ASM_SH_RWSEM_H */