Chapter 5 Real-Time Kernel
231
Return
If successful, it returns OS_NO_ERR.
If the requested priority already exists, it returns OS_PRIO_EXIST.
See Also
OSTaskDel
OSTaskDel
Purpose
To delete a task.
Syntax
unsigned char OSTaskDel (unsigned char prio);
where,
prio
is the task priority. A unique priority number must be assigned to
each task; the lower the number, the higher the priority.
Example
err = OSTaskDel (10); /* delete a task with priority 10 */
Description
This function allows user application to delete a task by specifying the priority
number of the task. The calling task can be deleted by specifying its own
priority number. The deleted task is returned to the dormant state. The deleted
task may be created to make the deleted task active again. Note that an ISR
cannot delete a task. This function will verify that you are not attempting to
delete the µC/OS's idle task.
Return
If successful, it returns OS_NO_ERR.
If the task to be deleted does not exist, it returns OS_TASK_DEL_ERR.
If the task to be deleted is an idle task, it returns OS_TASK_DEL_IDLE.
See Also
OSTaskCreate
OSTimeDly
Purpose
To allow a task to delay itself for a number of clock ticks.
Syntax
void OSTimeDly (unsigned long ticks);
where,
ticks
is the number of clock ticks to delay the current task; delay time in
units of 5 ms.
Example
OSTimeDly (10); /* delay task for 50 ms */
Description
This function allows a task to delay itself for a number of clock ticks.
Rescheduling always occurs when the number of clock ticks is greater than
zero. Valid delays range from 1 to 65535 ticks. Calling this function with a
delay of 0 results in no delay, and thus the function returns to the caller. Note
that this function cannot be called from an ISR.
Return
None
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...