<< Previous | Next >> | |
|
INT8U OSTaskCreate( void (*task)(), void *pdata, INT16U stk_size, INT8U prio );
Description
- Creates a task to be managed by µC/OS-II. Tasks can either be created prior to the start of multitasking or by a running task. A task cannot be created by an ISR.
Parameters
- task
- Pointer to the task's starting address.
- pdata
- Pointer to a task's initial parameters.
- stk_size
- Number of bytes of the stack.
- prior
- The task's unique priority number.
Return value
- OS_NO_ERR
- The call was successful.
- OS_PRIO_EXIT
- Task priority already exists (each task MUST have a unique priority).
- OS_PRIO_INVALID
- The priority specified is higher than the maximum allowed (i.e. ≥
OS_LOWEST_PRIO
).
Library
- UCOS2.LIB
See also
- OSTaskCreateExt
Dynamic C Functions | << Previous | Next >> | rabbit.com |