| 130 | } |
| 131 | |
| 132 | static struct timeout_callback * |
| 133 | timer_queue_expired(struct timer_queue *tq, struct mono_time *current_time) |
| 134 | { |
| 135 | struct timeout_callback *tocb; |
| 136 | |
| 137 | tocb = timer_queue_head(tq); |
| 138 | |
| 139 | if (tocb == NULL) |
| 140 | return NULL; |
| 141 | |
| 142 | /* The timeout callback hasn't expired yet. */ |
| 143 | if (mono_time_before(current_time, &tocb->expiration)) |
| 144 | return NULL; |
| 145 | |
| 146 | timer_queue_remove_head(tq); |
| 147 | |
| 148 | return tocb; |
| 149 | } |
| 150 | |
| 151 | int timer_sched_callback(struct timeout_callback *tocb, uint64_t us) |
| 152 | { |
no test coverage detected