Changeset 43114c5 in mainline for src/time/timeout.c
- Timestamp:
- 2005-04-09T18:22:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8262010
- Parents:
- e6ba9a3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/time/timeout.c
re6ba9a3f r43114c5 40 40 void timeout_init(void) 41 41 { 42 spinlock_initialize(& the->cpu->timeoutlock);43 list_initialize(& the->cpu->timeout_active_head);42 spinlock_initialize(&CPU->timeoutlock); 43 list_initialize(&CPU->timeout_active_head); 44 44 } 45 45 … … 71 71 72 72 pri = cpu_priority_high(); 73 spinlock_lock(& the->cpu->timeoutlock);73 spinlock_lock(&CPU->timeoutlock); 74 74 spinlock_lock(&t->lock); 75 75 … … 77 77 panic("timeout_register: t->cpu != 0"); 78 78 79 t->cpu = the->cpu;79 t->cpu = CPU; 80 80 t->ticks = us2ticks(time); 81 81 … … 87 87 */ 88 88 sum = 0; 89 l = the->cpu->timeout_active_head.next;90 while (l != & the->cpu->timeout_active_head) {89 l = CPU->timeout_active_head.next; 90 while (l != &CPU->timeout_active_head) { 91 91 hlp = list_get_instance(l, timeout_t, link); 92 92 spinlock_lock(&hlp->lock); … … 110 110 * Decrease ticks of t's immediate succesor by t->ticks. 111 111 */ 112 if (l != & the->cpu->timeout_active_head) {112 if (l != &CPU->timeout_active_head) { 113 113 spinlock_lock(&hlp->lock); 114 114 hlp->ticks -= t->ticks; … … 117 117 118 118 spinlock_unlock(&t->lock); 119 spinlock_unlock(& the->cpu->timeoutlock);119 spinlock_unlock(&CPU->timeoutlock); 120 120 cpu_priority_restore(pri); 121 121 }
Note:
See TracChangeset
for help on using the changeset viewer.