|
|
| version 1.4.2.3, 2012/01/24 14:04:58 | version 1.5, 2012/01/24 21:59:47 |
|---|---|
| Line 250 schedTimer(sched_root_task_t * __restrict root, sched_ | Line 250 schedTimer(sched_root_task_t * __restrict root, sched_ |
| clock_gettime(CLOCK_MONOTONIC, &now); | clock_gettime(CLOCK_MONOTONIC, &now); |
| now.tv_sec += ts.tv_sec; | now.tv_sec += ts.tv_sec; |
| now.tv_nsec += ts.tv_nsec; | now.tv_nsec += ts.tv_nsec; |
| if (now.tv_nsec >= 1000000000) { | if (now.tv_nsec >= 1000000000L) { |
| now.tv_sec++; | now.tv_sec++; |
| now.tv_nsec -= 1000000000; | now.tv_nsec -= 1000000000L; |
| } else if (now.tv_nsec < 0) { | } else if (now.tv_nsec < 0) { |
| now.tv_sec--; | now.tv_sec--; |
| now.tv_nsec += 1000000000; | now.tv_nsec += 1000000000L; |
| } | } |
| TASK_TS(task) = now; | TASK_TS(task) = now; |
| Line 272 schedTimer(sched_root_task_t * __restrict root, sched_ | Line 272 schedTimer(sched_root_task_t * __restrict root, sched_ |
| TAILQ_INSERT_TAIL(&root->root_timer, task, task_node); | TAILQ_INSERT_TAIL(&root->root_timer, task, task_node); |
| #else | #else |
| TAILQ_FOREACH(t, &root->root_timer, task_node) | TAILQ_FOREACH(t, &root->root_timer, task_node) |
| if (timespeccmp(&TASK_TS(task), &TASK_TS(t), -) < 1) | if (sched_timespeccmp(&TASK_TS(task), &TASK_TS(t), -) < 1) |
| break; | break; |
| if (!t) | if (!t) |
| TAILQ_INSERT_TAIL(&root->root_timer, task, task_node); | TAILQ_INSERT_TAIL(&root->root_timer, task, task_node); |