|
|
| version 1.12, 2012/08/08 08:25:39 | version 1.13, 2012/08/08 23:04:41 |
|---|---|
| Line 958 sched_hook_fetch(void *root, void *arg __unused) | Line 958 sched_hook_fetch(void *root, void *arg __unused) |
| } | } |
| /* put regular task priority task to ready queue, | /* put regular task priority task to ready queue, |
| if there is no ready task or reach max missing hit events */ | if there is no ready task or reach max missing hit for regular task */ |
| if ((task = TAILQ_FIRST(&r->root_task))) { | if ((task = TAILQ_FIRST(&r->root_task))) { |
| if (!TAILQ_FIRST(&r->root_ready) || r->root_task_miss > r->root_miss) { | if (!TAILQ_FIRST(&r->root_ready) || r->root_miss >= TASK_VAL(task)) { |
| r->root_task_miss ^= r->root_task_miss; | r->root_miss ^= r->root_miss; |
| #ifdef HAVE_LIBPTHREAD | #ifdef HAVE_LIBPTHREAD |
| pthread_mutex_lock(&r->root_mtx[taskTASK]); | pthread_mutex_lock(&r->root_mtx[taskTASK]); |
| Line 979 sched_hook_fetch(void *root, void *arg __unused) | Line 979 sched_hook_fetch(void *root, void *arg __unused) |
| pthread_mutex_unlock(&r->root_mtx[taskREADY]); | pthread_mutex_unlock(&r->root_mtx[taskREADY]); |
| #endif | #endif |
| } else | } else |
| r->root_task_miss++; | r->root_miss++; |
| } else | } else |
| r->root_task_miss ^= r->root_task_miss; | r->root_miss ^= r->root_miss; |
| /* OK, lets get ready task !!! */ | /* OK, lets get ready task !!! */ |
| task = TAILQ_FIRST(&r->root_ready); | task = TAILQ_FIRST(&r->root_ready); |