Task Scheduler
f3c51100
|
Functions | |
TASH_SCH_EXTERN int | schRunTaskSch (schTaskSch *sch) |
TASH_SCH_EXTERN int | schStopTaskSch (schTaskSch *sch, long int timeout_nanoseconds) |
TASH_SCH_EXTERN int | schTerminateTaskSch (schTaskSch *sch) |
TASH_SCH_EXTERN int | schSubmitTask (schTaskSch *sch, schTaskPackage *package, schTaskPool *pPool) |
TASH_SCH_EXTERN int | schClearTask (schTaskSch *sch, schTaskPool *pool) |
TASH_SCH_EXTERN int | schClearAllTask (schTaskSch *sch) |
TASH_SCH_EXTERN int | schWaitTask (schTaskSch *sch) |
TASH_SCH_EXTERN int | schWaitTaskWait (schTaskSch *sch, long int wait_nanoseconds) |
TASH_SCH_EXTERN int | schPoolLock (schTaskPool *pool) |
TASH_SCH_EXTERN int | schPoolMutexUnLock (schTaskPool *pool) |
TASH_SCH_EXTERN int schRunTaskSch | ( | schTaskSch * | sch | ) |
Start running task scheduler. This will create the internal thread for each pool followed by the startup sequence.
sch | valid scheduler object. |
TASH_SCH_EXTERN int schStopTaskSch | ( | schTaskSch * | sch, |
long int | timeout_nanoseconds | ||
) |
Stop all current tasks.
sch | valid scheduler object. |
timeout_nanoseconds | how long it w |
TASH_SCH_EXTERN int schTerminateTaskSch | ( | schTaskSch * | sch | ) |
Terminate the scheduler.
sch | valid scheduler object. |
TASH_SCH_EXTERN int schSubmitTask | ( | schTaskSch * | sch, |
schTaskPackage * | package, | ||
schTaskPool * | pPool | ||
) |
submit a task packet, it will be assigned accordingly to the priority queue, unless user specifies which pool it will be foced onto.
sch | valid scheduler object. |
package | valid task package, that will be sumbitted to the pools. |
pPool | specific pool queue. |
TASH_SCH_EXTERN int schClearTask | ( | schTaskSch * | sch, |
schTaskPool * | pool | ||
) |
Remove all tasks on all of the pools on the scheduler. But if the pool argument is specified it will clear only a single specific pool.
sch | |
pool |
TASH_SCH_EXTERN int schClearAllTask | ( | schTaskSch * | sch | ) |
sch |
TASH_SCH_EXTERN int schWaitTask | ( | schTaskSch * | sch | ) |
Wait for all pool to finish with all their tasks.
sch | valid scheduler object. |
TASH_SCH_EXTERN int schWaitTaskWait | ( | schTaskSch * | sch, |
long int | wait_nanoseconds | ||
) |
Wait for all pool to finish with all their tasks.
sch | valid scheduler object. |
wait_nanoseconds | time in nano seconds. |
TASH_SCH_EXTERN int schPoolLock | ( | schTaskPool * | pool | ) |
Lock current task pool in current function
pool | valid pool object. |
TASH_SCH_EXTERN int schPoolMutexUnLock | ( | schTaskPool * | pool | ) |
Unlock current task pool in current function
pool | valid pool object. |