Changeset 31d8e10 in mainline for kernel/generic/include/synch/spinlock.h
- Timestamp:
- 2007-04-05T16:09:49Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 547fa39
- Parents:
- 879585a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/spinlock.h
r879585a3 r31d8e10 102 102 } 103 103 104 #ifdef CONFIG_DEBUG_SPINLOCK 105 106 extern int printf(const char *, ...); 107 108 #define DEADLOCK_THRESHOLD 100000000 109 #define DEADLOCK_PROBE_INIT(pname) count_t pname = 0 110 #define DEADLOCK_PROBE(pname, value) \ 111 if ((pname)++ > (value)) { \ 112 (pname) = 0; \ 113 printf("Deadlock probe %s: exceeded threshold %d\n", \ 114 "cpu%d: function=%s, line=%d\n", \ 115 #pname, (value), CPU->id, __FUNCTION__, __LINE__); \ 116 } 117 #else 118 #define DEADLOCK_PROBE_INIT(pname) 119 #define DEADLOCK_PROBE(pname, value) 120 #endif 121 104 122 #else 105 123 … … 114 132 #define spinlock_unlock(x) preemption_enable() 115 133 134 #define DEADLOCK_PROBE_INIT(pname) 135 #define DEADLOCK_PROBE(pname, value) 136 116 137 #endif 117 138
Note:
See TracChangeset
for help on using the changeset viewer.