osGetTaskQuantum function
BOOL osGetTaskQuantum(
  HANDLE Handle,
  UINT8 *Quantum

A task handle.


A pointer to variable that receive maximal task quanta.

Return value:

TRUE on success or FALSE on failure. Use osGetLastError function to obtain extended error information.


Function returns maximal task quanta of the specified task.

If two or more tasks that are in ready state have the same priority, their simultaneous execution is ensured by fast switching from execution of one task to another. The schedulerassigns a short CPU time slice (called a time quantum) to each task that runs. When a task performs a long operation, you may inform the scheduler to assign more CPU time slices to this task. The scheduler usually assigns only one quantum. To change the number of assigned time quanta, use an osSetTaskQuantum function. This function allows obtaining this value.

Function is available only, when the value of OS_TASK_QUANTUM_FUNC constant is set to 1. When function is not used, it may be disabled to reduce the output code.

Header file:OS_Task.h (include OS_API.h)
See also: BOOL, FALSE, HANDLE, OS_TASK_QUANTUM_FUNC, osGetLastError, scheduler, tasks, TRUE, using priority and time quanta
SpaceShadow documentation