reverting changes which lead to wrong behaviour
Adding functionality to allow spinlocks to check if there are already held locks to avoid suspension and therefore possible deadlocks