[haiku-commits] haiku: hrev48221 - src/system/kernel

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 4 Nov 2014 23:03:04 +0100 (CET)

hrev48221 adds 1 changeset to branch 'master'
old head: 76b8f002e1aef2f3b7311178b810f3ed6f505b1c
new head: 9a6331459f21e0d4ac4e9fa4e951390159011039
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=9a63314+%5E76b8f00

----------------------------------------------------------------------------

9a63314: kernel: Fix build with KDEBUG_LEVEL < 2.
  
  The lock caller info isn't available in such a configuration.

                                            [ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48221
Commit:      9a6331459f21e0d4ac4e9fa4e951390159011039
URL:         http://cgit.haiku-os.org/haiku/commit/?id=9a63314
Author:      Michael Lotz <mmlr@xxxxxxxx>
Date:        Tue Nov  4 21:57:56 2014 UTC

----------------------------------------------------------------------------

1 file changed, 18 insertions(+)
src/system/kernel/smp.cpp | 18 ++++++++++++++++++

----------------------------------------------------------------------------

diff --git a/src/system/kernel/smp.cpp b/src/system/kernel/smp.cpp
index 8d2700e..29e3dfc 100644
--- a/src/system/kernel/smp.cpp
+++ b/src/system/kernel/smp.cpp
@@ -362,9 +362,15 @@ acquire_spinlock(spinlock* lock)
                        uint32 count = 0;
                        while (lock->lock != 0) {
                                if (++count == SPINLOCK_DEADLOCK_COUNT) {
+#      if DEBUG_SPINLOCKS
                                        panic("acquire_spinlock(): Failed to 
acquire spinlock %p "
                                                "for a long time (last caller: 
%p, value: %" B_PRIx32
                                                ")", lock, 
find_lock_caller(lock), lock->lock);
+#      else
+                                       panic("acquire_spinlock(): Failed to 
acquire spinlock %p "
+                                               "for a long time (value: %" 
B_PRIx32 ")", lock,
+                                               lock->lock);
+#      endif
                                        count = 0;
                                }
 
@@ -416,9 +422,15 @@ acquire_spinlock_nocheck(spinlock *lock)
                        uint32 count = 0;
                        while (lock->lock != 0) {
                                if (++count == 
SPINLOCK_DEADLOCK_COUNT_NO_CHECK) {
+#      if DEBUG_SPINLOCKS
                                        panic("acquire_spinlock_nocheck(): 
Failed to acquire "
                                                "spinlock %p for a long time 
(last caller: %p, value: %"
                                                B_PRIx32 ")", lock, 
find_lock_caller(lock), lock->lock);
+#      else
+                                       panic("acquire_spinlock_nocheck(): 
Failed to acquire "
+                                               "spinlock %p for a long time 
(value: %" B_PRIx32 ")",
+                                               lock, lock->lock);
+#      endif
                                        count = 0;
                                }
 
@@ -468,9 +480,15 @@ acquire_spinlock_cpu(int32 currentCPU, spinlock *lock)
                        uint32 count = 0;
                        while (lock->lock != 0) {
                                if (++count == SPINLOCK_DEADLOCK_COUNT) {
+#      if DEBUG_SPINLOCKS
                                        panic("acquire_spinlock_cpu(): Failed 
to acquire spinlock "
                                                "%p for a long time (last 
caller: %p, value: %" B_PRIx32
                                                ")", lock, 
find_lock_caller(lock), lock->lock);
+#      else
+                                       panic("acquire_spinlock_cpu(): Failed 
to acquire spinlock "
+                                               "%p for a long time (value: %" 
B_PRIx32 ")", lock,
+                                               lock->lock);
+#      endif
                                        count = 0;
                                }
 


Other related posts:

  • » [haiku-commits] haiku: hrev48221 - src/system/kernel - mmlr