Changeset 14df080 in mainline for generic/src/synch/spinlock.c


Ignore:
Timestamp:
2006-06-08T16:17:59Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
85d24f61
Parents:
3701250
Message:

Print spurious interrupt messages only when compiled with CONFIG_DEBUG.
Print warning about looping spinlock only after 100000000 unsuccessfull attempts to gain the spinlock.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/synch/spinlock.c

    r3701250 r14df080  
    7070 */
    7171#ifdef CONFIG_DEBUG_SPINLOCK
     72#define DEADLOCK_THRESHOLD      100000000
    7273void spinlock_lock_debug(spinlock_t *sl)
    7374{
     
    102103                        continue;
    103104#endif
    104                 if (i++ > 10000000) {
     105                if (i++ > DEADLOCK_THRESHOLD) {
    105106                        printf("cpu%d: looping on spinlock %.*p:%s, caller=%.*p",
    106107                               CPU->id, sizeof(__address) * 2, sl, sl->name, sizeof(__address) * 2, CALLER);
Note: See TracChangeset for help on using the changeset viewer.