The os_sys_init_user function initializes and starts the Real-Time eXecutive (RTX) kernel. Use this function when you must specify a large stack for the starting task. The task argument points to the task function to start after the kernel is initialized. The priority argument specifies the priority for the task. The default task priority is 1. Priority 0 is reserved for the Idle Task. If a value of 0 is specified for the priority, it is automatically replaced with a value of 1. Priority 255 is also reserved. The stack argument points to a memory block reserved for the stack to use for the task. The size argument specifies the size of the stack in bytes. The os_sys_init_user function is in the RL-RTX library. The prototype is defined in rtl.h. Note - The os_sys_init_user function must be called from the main C function.
- The stack must be aligned at an 8-byte boundary and must be declared as an array of type U64 (unsigned long long).
- The default stack size is defined in rtx_config.c.
- Priority value of 255 represents the most important task.
|