implementing select between mutex and spinlock, cosmetics