|
Page date Wed Feb 23 10:44:36 2011 . | Improve this page |
OSScheduler
Description
This constructor print a trace messsage (if debug is active).
Parameters
:* None.
Description
This method performs early initialisations of the OSScheduler task. It must be called before all constructors.
Parameters
:* None.
Return value
:* None.
Description
Enable the scheduler to run and start the task with the highes priority. This function is automatically called in the default main() function, called after all static constructors were executed.
Parameters
:* None.
Return value
:* None.
Description
Return true if the the scheduler was started. Please note that once started, the scheduler cannot be stopped, so this function will return false before main() (i.e. while running static constructors) and true after main().
Parameters
:* None.
Return value
:* True if the the scheduler was started. False otherwise.
Description
Lock the scheduler to the current task, i.e. do not allow the scheduler to switch to another task. Please note that interrupts are not affected, the interrupt service routines will be executed normally and event notifications might wakeup tasks with higher priorities, but switching to another task will be permited only after unlock(). While locked, yield() will immediately return to the same task, and eventWait() will immediately return with OSEventWaitReturn::OS_LOCKED.
Parameters
:* None.
Return value
:* None.
Description
Unlock the scheduler, so at the next rescheduling moment another task might get the CPU.
Parameters
:* None.
Return value
:* None.
Description
Return true if the scheduler is locked.
Parameters
:* None.
Return value
:* TRUE if the scheduler is locked, FALSE otherwise.
Description
Lock the scheduler if the flag is true, unlock otherwise.
Parameters
:* flag - if is TRUE the scheduler will be locked.
Return value
:* None.
Description
Return true if the scheduler runs in preemptive mode.
Parameters
:* None.
Return value
:* TRUE if the preemptive mode was activated, FALSE otherwise.
Description
Return true if the scheduler runs in preemptive mode.
Parameters
:* flag - if is TRUE, set the preemptive mode.
Return value
:* None.
Description
Return a pointer to the task currently running on the CPU.
Parameters
:* None.
Return value
:* Pointer to the task currently running on the CPU.
Description
Return a pointer to the Idle task.
Parameters
:* None.
Return value
:* Pointer to the Idle task.
Description
Return the number of tasks registered to the scheduler.
Parameters
:* None.
Return value
:* The number of tasks registered to the scheduler.
Description
Return the i-th task registered to the scheduler, or OS_TASK_NONE for illegal index.
Parameters
:* None.
Return value
:* The i-th task registered to the scheduler, or OS_TASK_NONE for illegal index.
Description
Return true if the deep sleep flag was set to true. Requires definition of OS_INCLUDE_OSTASK_SLEEP.
Parameters
:* None.
Return value
:* Return true if the deep sleep flag was set to true.
Description
Set the value of the deep sleep flag. Requires definition of OS_INCLUDE_OSTASK_SLEEP.
Parameters
:* bool - the value where the deep sleep flag will be set to.
Return value
:* None.
Description
Enter a critical section, i.e. a section where interrupts are not allowed. It is mandatory to be braced by a criticalExit(), failure to do so leads to unexpected results. The usual implementations save the current status of the interrupt flag and disable interrupts.
Parameters
:* None.
Return value
:* None.
Description
Exit critical section. Usual implementations restore the interrupt flag to the value saved by criticalEnter().
Parameters
:* None.
Return value
:* None.
Description
Put the active task to sleep until an event occurs.
Parameters
:* event - the event used to wake up the task.
Return value
:* Status of the operation.
== static int eventNotify(OSEvent_t event, OSEventWaitReturn_t ret = OSEventWaitReturn::OS_VOID) == Description
Wakeup all tasks waiting for event.
Parameters
:* event - the event used to wake up the tasks.
:* ret - suplimentary information used to determine more informations about the source of the event.
Return value
:* The number of notified tasks.
Description
Suspend the current task and reschedule the CPU to the next task.
Parameters
:* None.
Return value
:* None.
Description
Register a task to the scheduler.
Parameters
:* None.
Return value
:* None.
Description
Quick check if a context switch is necessary.
Parameters
:* None.
Return value
:* TRUE if a context switch is needed.
Description
Make the context switch to the first task from the tasks ReadyList.
Parameters
:* None.
Return value
:* None.
Description
Called in order to save the context of the current task must be called in conjunction with interruptExit.
Parameters
:* None.
Return value
:* None.
Description
Called in order to perform the context switch must be called in conjunction with interruptEnter.
Parameters
:* None.
Return value
:* None.
Description
Timer, expressed in ticks, used to schedule the next task.
Description
Timer expressed in seconds.
Description
Pointer to the active task (running task).