missing CAS-locks and barriers
* %WAITQUEUE-ENQUEUE was missing the CAS-lock, as was checking for
the wakeup.
* Put back the spin-before-yielding loop into WITH-CAS-LOCK, which
I'd removed for some reason.
* PPC has threads, and really needs barriers. x86oids have made me
lazy, and now we pay the price. In particular:
** THREAD-WAITING-FOR: a read barrier in the non-futex
CONDITION-WAIT -- the corresponding writes are protected
by CAS and hence provide a write barrier already.
...and just for symmetry and because this makes my poor
head hurt add write and read barriers to other places where
it is read from / written to.
** WITH-CAS-LOCK: a read barrier for the READ-FORM. Not strictly
necessary perhaps, as THREAD-YIELD most probably provides a
barrier, but this is easier to read. Since the corresponding
writes should use CAS, we're OK.