summaryrefslogtreecommitdiff
path: root/include/linux/semaphore.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/semaphore.h')
-rw-r--r--include/linux/semaphore.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h
index 9cae64b00d6b..d245e6fade84 100644
--- a/include/linux/semaphore.h
+++ b/include/linux/semaphore.h
@@ -44,8 +44,12 @@ static inline void sema_init(struct semaphore *sem, int val)
extern void down(struct semaphore *sem);
extern int __must_check down_interruptible(struct semaphore *sem);
extern int __must_check down_killable(struct semaphore *sem);
-extern int __must_check down_trylock(struct semaphore *sem);
+extern int __must_check down_try(struct semaphore *sem);
+/* Old down_trylock() returned the opposite of what was expected. */
+static inline int __deprecated down_trylock(struct semaphore *sem)
+{
+ return !down_try(sem);
+}
extern int __must_check down_timeout(struct semaphore *sem, long jiffies);
extern void up(struct semaphore *sem);
-
#endif /* __LINUX_SEMAPHORE_H */