Download COMPLETE EMBEDDED SOLUTIONS
Transcript
QUICK REFERENCE
OPERATING SYSTEM FUNCTION
-- K_OS_Start
OPERATING SYSTEM FUNCTION
K_OS_Start
Purpose: The K_OS_Start function is called to invoke the CMX operating system.
Once this function is called, the CMX operating system takes control of the CPU and
determines when tasks should run and execute. It is up to you to make sure at least one
task is READY or will become READY by using the K_Task_Start function before
calling K_OS_Start. Once you enter the CMX operating system, there is no way to exit
the CMX operating system.
Called
When you want to enter the CMX operating system.
#include <cpfuncs.h> /* has function prototype */
void K_OS_Start(void); /* this is the function prototype */
Passed
Nothing.
Returned
Never returns from the CMX operating system.
K_OS_Start Example:
void main(void)
{
/* define any locals within main */
K_OS_Init(); /* initialize CMX */
...
/* now the user can access any CMX function, that is allowed
to be accessed prior to entering the CMX operating system */
...
/* Set up CMX by create tasks, etc. Start at least one task. */
...
K_OS_Start(); /* enter into the CMX operating system */
/* NOTE: will never return to this point */
}
61