Changeset 22f7769 in mainline for src/time/timeout.c
- Timestamp:
- 2005-10-17T23:31:41Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4b2c872d
- Parents:
- 75eacab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/time/timeout.c
r75eacab r22f7769 101 101 timeout_t *hlp; 102 102 link_t *l, *m; 103 pri_t pri;103 ipl_t ipl; 104 104 __u64 sum; 105 105 106 pri = cpu_priority_high();106 ipl = interrupts_disable(); 107 107 spinlock_lock(&CPU->timeoutlock); 108 108 spinlock_lock(&t->lock); … … 153 153 spinlock_unlock(&t->lock); 154 154 spinlock_unlock(&CPU->timeoutlock); 155 cpu_priority_restore(pri);155 interrupts_restore(ipl); 156 156 } 157 157 … … 169 169 timeout_t *hlp; 170 170 link_t *l; 171 pri_t pri;171 ipl_t ipl; 172 172 173 173 grab_locks: 174 pri = cpu_priority_high();174 ipl = interrupts_disable(); 175 175 spinlock_lock(&t->lock); 176 176 if (!t->cpu) { 177 177 spinlock_unlock(&t->lock); 178 cpu_priority_restore(pri);178 interrupts_restore(ipl); 179 179 return false; 180 180 } 181 181 if (!spinlock_trylock(&t->cpu->timeoutlock)) { 182 182 spinlock_unlock(&t->lock); 183 cpu_priority_restore(pri);183 interrupts_restore(ipl); 184 184 goto grab_locks; 185 185 } … … 204 204 spinlock_unlock(&t->lock); 205 205 206 cpu_priority_restore(pri);206 interrupts_restore(ipl); 207 207 return true; 208 208 }
Note:
See TracChangeset
for help on using the changeset viewer.