> NOTICE: LockRelease: no such lock
>
> I'm afraid now the locking is broken. Will look into more.
Next try would be _check_lock (found in sys/atomic_op.h):
Description (from man page)
The _check_lock subroutine performs an atomic (uninterruptible) sequence of
operations. The compare_and_swap subroutine is similar, but does not issue
synchronization instructions and therefore is inappropriate for updating lock
words.
replace the TAS define with:
#define TAS(lock) _check_lock(lock, 0, 1)
> with LinuxPPC asm: 2m9.340s
> with cs: 10m11.15s
> with fetch_and_or: 3m55.19s
with _check_lock: 3m29.990s
I think that the culprit may also be the S_UNLOCK (use _clear_lock) ?
Andreas