Changeset 31d8e10 in mainline for kernel/generic/include
- Timestamp:
- 2007-04-05T16:09:49Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 547fa39
- Parents:
- 879585a3
- Location:
- kernel/generic/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
r879585a3 r31d8e10 102 102 asid_t asid; 103 103 104 /** Number of references (i.e tasks that reference this as). */ 105 atomic_t refcount; 106 104 107 mutex_t lock; 105 106 /** Number of references (i.e tasks that reference this as). */107 count_t refcount;108 108 109 109 /** B+tree of address space areas. */ … … 148 148 asid_t asid; 149 149 150 /** Number of references (i.e tasks that reference this as). */ 151 atomic_t refcount; 152 150 153 mutex_t lock; 151 152 /** Number of references (i.e tasks that reference this as). */153 count_t refcount;154 154 155 155 /** B+tree of address space areas. */ -
kernel/generic/include/synch/mutex.h
r879585a3 r31d8e10 45 45 46 46 #define mutex_lock(mtx) \ 47 _mutex_lock_timeout((mtx), SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE)47 _mutex_lock_timeout((mtx), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE) 48 48 #define mutex_trylock(mtx) \ 49 _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) 50 #define mutex_lock_timeout(mtx,usec) \ 51 _mutex_lock_timeout((mtx),(usec),SYNCH_FLAGS_NON_BLOCKING) 52 #define mutex_lock_active(mtx) \ 53 while (mutex_trylock((mtx)) != ESYNCH_OK_ATOMIC) 49 _mutex_lock_timeout((mtx), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NON_BLOCKING) 50 #define mutex_lock_timeout(mtx, usec) \ 51 _mutex_lock_timeout((mtx), (usec), SYNCH_FLAGS_NON_BLOCKING) 54 52 55 53 extern void mutex_initialize(mutex_t *mtx); -
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.