Changes in kernel/generic/src/synch/mutex.c [c0699467:311929ec] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/mutex.c
rc0699467 r311929ec 40 40 #include <debug.h> 41 41 #include <arch.h> 42 #include <stacktrace.h> 42 43 43 44 /** Initialize mutex. … … 87 88 ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE)); 88 89 90 unsigned int cnt = 0; 91 bool deadlock_reported = false; 89 92 do { 93 if (cnt++ > DEADLOCK_THRESHOLD) { 94 printf("cpu%u: looping on active mutex %p\n", 95 CPU->id, mtx); 96 stack_trace(); 97 cnt = 0; 98 deadlock_reported = true; 99 } 90 100 rc = semaphore_trydown(&mtx->sem); 91 101 } while (SYNCH_FAILED(rc) && 92 102 !(flags & SYNCH_FLAGS_NON_BLOCKING)); 103 if (deadlock_reported) 104 printf("cpu%u: not deadlocked\n", CPU->id); 93 105 } 94 106
Note:
See TracChangeset
for help on using the changeset viewer.