Make check_locking check both spinlocks and semaphores.