I still think using BUILD_BUG_ON() is unacceptable, especially given how
vague the error message was.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
[ And I already removed gthe BUILD_BUG_ON() in the previous commit ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
*/
extern __inline__ int down_trylock(struct semaphore * sem)
{
*/
extern __inline__ int down_trylock(struct semaphore * sem)
{
+ unsigned long flags;
+ int count;
spin_lock_irqsave(&sem->sentry, flags);
count = sem->count - 1;
spin_lock_irqsave(&sem->sentry, flags);
count = sem->count - 1;
*/
extern __inline__ void up(struct semaphore * sem)
{
*/
extern __inline__ void up(struct semaphore * sem)
{
spin_lock_irqsave(&sem->sentry, flags);
if (sem->count < 0) {
__up(sem);
spin_lock_irqsave(&sem->sentry, flags);
if (sem->count < 0) {
__up(sem);