Commit 2f7729fe authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Add might_sleep() calls to down and down_interruptible.

parent 4447e8db
...@@ -83,6 +83,7 @@ extern inline void down(struct semaphore * sem) ...@@ -83,6 +83,7 @@ extern inline void down(struct semaphore * sem)
#if WAITQUEUE_DEBUG #if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
might_sleep();
/* /*
* Try to get the semaphore, take the slow path if we fail. * Try to get the semaphore, take the slow path if we fail.
...@@ -99,6 +100,7 @@ extern inline int down_interruptible(struct semaphore * sem) ...@@ -99,6 +100,7 @@ extern inline int down_interruptible(struct semaphore * sem)
#if WAITQUEUE_DEBUG #if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
might_sleep();
if (atomic_dec_return(&sem->count) < 0) if (atomic_dec_return(&sem->count) < 0)
ret = __down_interruptible(sem); ret = __down_interruptible(sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment