BUG: Reverse logic for compare-and-swap calls.

This patch fixes a bug in the queuelock code where
the logical treatment of the return code of
compare-and-swap is backwards.