Changeset 53f9821 in mainline for generic/src
- Timestamp:
- 2006-03-20T20:32:17Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 018d957e
- Parents:
- 9d3e185
- Location:
- generic/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/lib/func.c
r9d3e185 r53f9821 55 55 } 56 56 #else 57 atomic_set( haltstate, 1);57 atomic_set(&haltstate, 1); 58 58 #endif 59 59 -
generic/src/synch/spinlock.c
r9d3e185 r53f9821 52 52 } 53 53 54 #ifdef CONFIG_DEBUG_SPINLOCK55 54 /** Lock spinlock 56 55 * … … 61 60 * @param sl Pointer to spinlock_t structure. 62 61 */ 63 void spinlock_lock(spinlock_t *sl) 62 #ifdef CONFIG_DEBUG_SPINLOCK 63 void spinlock_lock_debug(spinlock_t *sl) 64 64 { 65 65 count_t i = 0; … … 83 83 if (deadlock_reported) 84 84 printf("cpu%d: not deadlocked\n", CPU->id); 85 86 /*87 * Prevent critical section code from bleeding out this way up.88 */89 CS_ENTER_BARRIER();90 91 }92 93 #else94 95 /** Lock spinlock96 *97 * Lock spinlock.98 *99 * @param sl Pointer to spinlock_t structure.100 */101 void spinlock_lock(spinlock_t *sl)102 {103 preemption_disable();104 105 /*106 * Each architecture has its own efficient/recommended107 * implementation of spinlock.108 */109 spinlock_arch(&sl->val);110 85 111 86 /* … … 144 119 } 145 120 146 /** Unlock spinlock147 *148 * Unlock spinlock.149 *150 * @param sl Pointer to spinlock_t structure.151 */152 void spinlock_unlock(spinlock_t *sl)153 {154 ASSERT(atomic_get(&sl->val) != 0);155 156 /*157 * Prevent critical section code from bleeding out this way down.158 */159 CS_LEAVE_BARRIER();160 161 atomic_set(&sl->val,0);162 preemption_enable();163 }164 165 121 #endif -
generic/src/syscall/syscall.c
r9d3e185 r53f9821 63 63 } 64 64 65 /** Dispatch system call */ 66 __native syscall_handler(__native a1, __native a2, __native a3, 67 __native a4, __native id) 68 { 69 if (id < SYSCALL_END) 70 return syscall_table[id](a1,a2,a3,a4); 71 else 72 panic("Undefined syscall %d", id); 73 } 74 65 75 syshandler_t syscall_table[SYSCALL_END] = { 66 76 sys_io,
Note:
See TracChangeset
for help on using the changeset viewer.