This holds for down_trylocks too.
It looks like it is the spinlocks that are wrong... :-(
As most return values tend to be error returns that also
matches other code in functionallity.
>
> For spinlocks, it'll probably return something else ;/
It does...
I guess fixing this is too much too late?
It looks like ppc mixes the ways... from arch/ppc/lib/locks.c:46
int spin_trylock(spinlock_t *lock)
{
if (__spin_trylock(&lock->lock)) /* one on failure */
return 0; /* zero on failure */
lock->owner_cpu = smp_processor_id();
lock->owner_pc = (unsigned long)__builtin_return_address(0);
return 1;
}
BUT anyway...
The thing I hit is not a bug in the kernel proper - it is in the preemptive
stuff.
/RogerL
-- Home page: http://www.norran.net/nra02596/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/