Rev 4156 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4156 | Rev 4296 | ||
|---|---|---|---|
| Line 30... | Line 30... | ||
| 30 | * @{ |
30 | * @{ |
| 31 | */ |
31 | */ |
| 32 | 32 | ||
| 33 | /** |
33 | /** |
| 34 | * @file |
34 | * @file |
| 35 | * @brief Spinlocks. |
35 | * @brief Spinlocks. |
| 36 | */ |
36 | */ |
| 37 | 37 | ||
| 38 | #include <synch/spinlock.h> |
38 | #include <synch/spinlock.h> |
| 39 | #include <atomic.h> |
39 | #include <atomic.h> |
| 40 | #include <arch/barrier.h> |
40 | #include <arch/barrier.h> |
| 41 | #include <arch.h> |
41 | #include <arch.h> |
| 42 | #include <preemption.h> |
42 | #include <preemption.h> |
| Line 104... | Line 104... | ||
| 104 | if (sl == &fb_lock) |
104 | if (sl == &fb_lock) |
| 105 | continue; |
105 | continue; |
| 106 | #endif |
106 | #endif |
| 107 | if (i++ > DEADLOCK_THRESHOLD) { |
107 | if (i++ > DEADLOCK_THRESHOLD) { |
| 108 | printf("cpu%u: looping on spinlock %" PRIp ":%s, " |
108 | printf("cpu%u: looping on spinlock %" PRIp ":%s, " |
| 109 | "caller=%" PRIp "(%s)", CPU->id, sl, sl->name, |
109 | "caller=%" PRIp "(%s)\n", CPU->id, sl, sl->name, |
| 110 | CALLER, symtab_fmt_name_lookup(CALLER)); |
110 | CALLER, symtab_fmt_name_lookup(CALLER)); |
| 111 | 111 | ||
| 112 | i = 0; |
112 | i = 0; |
| 113 | deadlock_reported = true; |
113 | deadlock_reported = true; |
| 114 | } |
114 | } |
| 115 | } |
115 | } |
| 116 | 116 | ||