[kernel] remove critical_section, move everything to spinlocks

This commit is contained in:
Travis Geiselbrecht
2014-05-10 21:35:49 -07:00
parent bf1d680063
commit 8fb2c54304
18 changed files with 194 additions and 173 deletions

View File

@@ -584,7 +584,7 @@ static void spinlock_test(void)
printf("testing spinlock:\n");
ASSERT(!spin_lock_held(&lock));
ASSERT(!arch_ints_disabled());
spin_lock_irqsave(&lock, &state);
spin_lock_irqsave(&lock, state);
ASSERT(arch_ints_disabled());
ASSERT(spin_lock_held(&lock));
spin_unlock_irqrestore(&lock, state);
@@ -604,7 +604,7 @@ static void spinlock_test(void)
c = arch_cycle_count();
for (uint i = 0; i < COUNT; i++) {
spin_lock_irqsave(&lock, &state);
spin_lock_irqsave(&lock, state);
spin_unlock_irqrestore(&lock, state);
}
c = arch_cycle_count() - c;