Changeset d9cf9d5f in mainline for generic/src/synch/spinlock.c
- Timestamp:
- 2006-05-13T12:38:06Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e459f12
- Parents:
- 9f581365
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/synch/spinlock.c
r9f581365 rd9cf9d5f 41 41 #include <symtab.h> 42 42 43 #ifdef CONFIG_FB 44 #include <genarch/fb/fb.h> 45 #endif 46 43 47 #ifdef CONFIG_SMP 44 48 … … 74 78 preemption_disable(); 75 79 while (test_and_set(&sl->val)) { 76 if (i++ > 300000 && sl!=&printflock) { 80 81 /* 82 * We need to be careful about printflock and fb_lock. 83 * Both of them are used to report deadlocks via 84 * printf() and fb_putchar(). 85 * 86 * We trust our code that there is no possible deadlock 87 * caused by these two locks (except when an exception 88 * is triggered for instance by printf() or fb_putchar()). 89 * However, we encountered false positives caused by very 90 * slow VESA framebuffer interaction (especially when 91 * run in a simulator) that caused problems with both 92 * printflock and fb_lock. 93 * 94 * Possible deadlocks on both printflock and fb_lock 95 * are therefore not reported as they would cause an 96 * infinite recursion. 97 */ 98 if (sl == &printflock) 99 continue; 100 #ifdef CONFIG_FB 101 if (sl == &fb_lock) 102 continue; 103 #endif 104 if (i++ > 300000) { 77 105 printf("cpu%d: looping on spinlock %.*p:%s, caller=%.*p", 78 106 CPU->id, sizeof(__address) * 2, sl, sl->name, sizeof(__address) * 2, CALLER);
Note:
See TracChangeset
for help on using the changeset viewer.