Assert that spinlocks are locked and unlocked on the same processor

This commit is contained in:
Ali Mashtizadeh 2015-02-16 15:41:32 -08:00
parent e2afc076a5
commit ce7e8ec194

View File

@ -93,6 +93,8 @@ Spinlock_Lock(Spinlock *lock)
void
Spinlock_Unlock(Spinlock *lock)
{
ASSERT(lock->cpu == CPU());
TAILQ_REMOVE(&lockStack[CPU()], lock, lockStack);
lock->rCount--;