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