Changeset c93e805 in mainline for generic/src/time/clock.c
- Timestamp:
- 2006-05-28T11:29:23Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74fbedb
- Parents:
- 6212095
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/time/clock.c
r6212095 rc93e805 63 63 timeout_handler_t f; 64 64 void *arg; 65 int i; 65 66 66 67 /* … … 68 69 * run all expired timeouts as you visit them. 69 70 */ 70 spinlock_lock(&CPU->timeoutlock); 71 while ((l = CPU->timeout_active_head.next) != &CPU->timeout_active_head) { 72 h = list_get_instance(l, timeout_t, link); 73 spinlock_lock(&h->lock); 74 if (h->ticks-- != 0) { 75 spinlock_unlock(&h->lock); 76 break; 71 for (i = 0; i < CPU->missed_clock_ticks; i++) { 72 spinlock_lock(&CPU->timeoutlock); 73 while ((l = CPU->timeout_active_head.next) != &CPU->timeout_active_head) { 74 h = list_get_instance(l, timeout_t, link); 75 spinlock_lock(&h->lock); 76 if (h->ticks-- != 0) { 77 spinlock_unlock(&h->lock); 78 break; 79 } 80 list_remove(l); 81 f = h->handler; 82 arg = h->arg; 83 timeout_reinitialize(h); 84 spinlock_unlock(&h->lock); 85 spinlock_unlock(&CPU->timeoutlock); 86 87 f(arg); 88 89 spinlock_lock(&CPU->timeoutlock); 77 90 } 78 list_remove(l);79 f = h->handler;80 arg = h->arg;81 timeout_reinitialize(h);82 spinlock_unlock(&h->lock);83 91 spinlock_unlock(&CPU->timeoutlock); 84 85 f(arg);86 87 spinlock_lock(&CPU->timeoutlock);88 92 } 89 spinlock_unlock(&CPU->timeoutlock);93 CPU->missed_clock_ticks = 0; 90 94 91 95 /*
Note:
See TracChangeset
for help on using the changeset viewer.