spinlock: Fix panic messages
Thanks Jérôme for pointing this out.
This commit is contained in:
parent
03f7d3d1db
commit
cec16c2dcf
@ -532,13 +532,13 @@ try_acquire_write_spinlock(rw_spinlock* lock)
|
|||||||
{
|
{
|
||||||
#if DEBUG_SPINLOCKS
|
#if DEBUG_SPINLOCKS
|
||||||
if (are_interrupts_enabled()) {
|
if (are_interrupts_enabled()) {
|
||||||
panic("try_acquire_write_spinlock: attempt to acquire lock %p with"
|
panic("try_acquire_write_spinlock: attempt to acquire lock %p with "
|
||||||
" interrupts enabled", lock);
|
"interrupts enabled", lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sNumCPUs < 2 && lock->lock != 0) {
|
if (sNumCPUs < 2 && lock->lock != 0) {
|
||||||
panic("acquire_spinlock_cpu(): attempt to acquire lock %p twice on "
|
panic("try_acquire_write_spinlock(): attempt to acquire lock %p twice "
|
||||||
"non-SMP system", lock);
|
"on non-SMP system", lock);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -551,8 +551,8 @@ acquire_write_spinlock(rw_spinlock* lock)
|
|||||||
{
|
{
|
||||||
#if DEBUG_SPINLOCKS
|
#if DEBUG_SPINLOCKS
|
||||||
if (are_interrupts_enabled()) {
|
if (are_interrupts_enabled()) {
|
||||||
panic("acquire_write_spinlock: attempt to acquire lock %p with"
|
panic("acquire_write_spinlock: attempt to acquire lock %p with "
|
||||||
" interrupts enabled", lock);
|
"interrupts enabled", lock);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -582,8 +582,8 @@ release_write_spinlock(rw_spinlock* lock)
|
|||||||
#if DEBUG_SPINLOCKS
|
#if DEBUG_SPINLOCKS
|
||||||
uint32 previous = atomic_get_and_set(&lock->lock, 0);
|
uint32 previous = atomic_get_and_set(&lock->lock, 0);
|
||||||
if ((previous & 1u << 31) == 0) {
|
if ((previous & 1u << 31) == 0) {
|
||||||
panic("release_write_spinlock: lock %p was already released (value:"
|
panic("release_write_spinlock: lock %p was already released (value: "
|
||||||
" %x)\n", lock, previous);
|
"%x)\n", lock, previous);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
atomic_set(&lock->lock, 0);
|
atomic_set(&lock->lock, 0);
|
||||||
@ -596,13 +596,13 @@ try_acquire_read_spinlock(rw_spinlock* lock)
|
|||||||
{
|
{
|
||||||
#if DEBUG_SPINLOCKS
|
#if DEBUG_SPINLOCKS
|
||||||
if (are_interrupts_enabled()) {
|
if (are_interrupts_enabled()) {
|
||||||
panic("try_acquire_read_spinlock: attempt to acquire lock %p with"
|
panic("try_acquire_read_spinlock: attempt to acquire lock %p with "
|
||||||
" interrupts enabled", lock);
|
"interrupts enabled", lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sNumCPUs < 2 && lock->lock != 0) {
|
if (sNumCPUs < 2 && lock->lock != 0) {
|
||||||
panic("acquire_spinlock_cpu(): attempt to acquire lock %p twice on "
|
panic("try_acquire_read_spinlock(): attempt to acquire lock %p twice "
|
||||||
"non-SMP system", lock);
|
"on non-SMP system", lock);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -620,8 +620,8 @@ acquire_read_spinlock(rw_spinlock* lock)
|
|||||||
{
|
{
|
||||||
#if DEBUG_SPINLOCKS
|
#if DEBUG_SPINLOCKS
|
||||||
if (are_interrupts_enabled()) {
|
if (are_interrupts_enabled()) {
|
||||||
panic("acquire_read_spinlock: attempt to acquire lock %p with"
|
panic("acquire_read_spinlock: attempt to acquire lock %p with "
|
||||||
" interrupts enabled", lock);
|
"interrupts enabled", lock);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user