X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-parisc%2Fsemaphore.h;h=d45827a21f943d07cb36153dd2906d937e016fb8;hb=7616ee95f27a04fd5a6434e9ef4a82cec4b2807c;hp=c9ee41cd0707948d9b031cbb2587f39b0d2ba973;hpb=328198acb7407301ddf6005c0fa1e04bd0c539c8;p=linux-2.6 diff --git a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h index c9ee41cd07..d45827a21f 100644 --- a/include/asm-parisc/semaphore.h +++ b/include/asm-parisc/semaphore.h @@ -115,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem) */ extern __inline__ int down_trylock(struct semaphore * sem) { - int flags, count; + unsigned long flags; + int count; spin_lock_irqsave(&sem->sentry, flags); count = sem->count - 1; @@ -131,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem) */ extern __inline__ void up(struct semaphore * sem) { - int flags; + unsigned long flags; + spin_lock_irqsave(&sem->sentry, flags); if (sem->count < 0) { __up(sem);