Changes in kernel/generic/src/time/timeout.c [55b77d9:da1bafb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/time/timeout.c
r55b77d9 rda1bafb 54 54 { 55 55 irq_spinlock_initialize(&CPU->timeoutlock, "cpu.timeoutlock"); 56 list_initialize(&CPU->timeout_active_ list);56 list_initialize(&CPU->timeout_active_head); 57 57 } 58 58 … … 119 119 timeout_t *target = NULL; 120 120 link_t *cur; 121 for (cur = CPU->timeout_active_ list.head.next;122 cur != &CPU->timeout_active_ list.head; cur = cur->next) {121 for (cur = CPU->timeout_active_head.next; 122 cur != &CPU->timeout_active_head; cur = cur->next) { 123 123 target = list_get_instance(cur, timeout_t, link); 124 124 irq_spinlock_lock(&target->lock, false); … … 135 135 /* Avoid using cur->prev directly */ 136 136 link_t *prev = cur->prev; 137 list_ insert_after(&timeout->link, prev);137 list_prepend(&timeout->link, prev); 138 138 139 139 /* … … 146 146 * Decrease ticks of timeout's immediate succesor by timeout->ticks. 147 147 */ 148 if (cur != &CPU->timeout_active_ list.head) {148 if (cur != &CPU->timeout_active_head) { 149 149 irq_spinlock_lock(&target->lock, false); 150 150 target->ticks -= timeout->ticks; … … 184 184 /* 185 185 * Now we know for sure that timeout hasn't been activated yet 186 * and is lurking in timeout->cpu->timeout_active_ list.186 * and is lurking in timeout->cpu->timeout_active_head queue. 187 187 */ 188 188 189 189 link_t *cur = timeout->link.next; 190 if (cur != &timeout->cpu->timeout_active_ list.head) {190 if (cur != &timeout->cpu->timeout_active_head) { 191 191 timeout_t *tmp = list_get_instance(cur, timeout_t, link); 192 192 irq_spinlock_lock(&tmp->lock, false);
Note:
See TracChangeset
for help on using the changeset viewer.