compare&exchange with self-invalidation is added. 

Small tweak to GLOCK function.