version 1.3, 2011/12/08 08:02:23
|
version 1.4, 2012/01/08 00:51:17
|
Line 204 schedEnd(sched_root_task_t ** __restrict root)
|
Line 204 schedEnd(sched_root_task_t ** __restrict root)
|
inline void * |
inline void * |
schedCall(sched_task_t * __restrict task) |
schedCall(sched_task_t * __restrict task) |
{ |
{ |
|
void *ptr = (void*) -1; |
|
|
if (!task) |
if (!task) |
return (void*) -1; | return ptr; |
|
|
|
if (!TASK_ISLOCKED(task)) |
|
TASK_LOCK(task); |
|
|
task->task_id++; |
task->task_id++; |
return task->task_func(task); | ptr = task->task_func(task); |
| |
| TASK_UNLOCK(task); |
| return ptr; |
} |
} |
|
|
/* |
/* |
Line 270 schedCancel(sched_task_t * __restrict task)
|
Line 278 schedCancel(sched_task_t * __restrict task)
|
} |
} |
if (queue) |
if (queue) |
TAILQ_REMOVE(queue, task, task_node); |
TAILQ_REMOVE(queue, task, task_node); |
if (task->task_type != taskUNUSE) { | if (task->task_type != taskUNUSE) |
task->task_type = taskUNUSE; | _sched_unuseTask(task); |
TAILQ_INSERT_TAIL(&task->task_root->root_unuse, task, task_node); | |
} | |
|
|
return 0; |
return 0; |
} |
} |
Line 354 schedCancelby(sched_root_task_t * __restrict root, sch
|
Line 360 schedCancelby(sched_root_task_t * __restrict root, sch
|
|
|
TAILQ_REMOVE(queue, task, task_node); |
TAILQ_REMOVE(queue, task, task_node); |
|
|
if (task->task_type != taskUNUSE) { | if (task->task_type != taskUNUSE) |
task->task_type = taskUNUSE; | _sched_unuseTask(task); |
TAILQ_INSERT_TAIL(&task->task_root->root_unuse, task, task_node); | |
} | |
return 0; |
return 0; |
} |
} |
|
|