Keil RTX51 Manual page 30

Table of Contents

Advertisement

30
os_delete_task
Summary:
Description:
Return Value:
See Also:
4
Example:
#include <rtx51tny.h>
char os_delete_task (
unsigned char task_id);
The os_delete_task function stops the task specified by the
task_id argument. The specified task is removed from the task list.
The os_delete_task function returns a value of 0 if the task was
successfully stopped and deleted. A return value of -1 indicates the
specified task does not exist or had not been started.
os_create_task
#include <rtx51tny.h>
#include <stdio.h>
void tst_os_delete_task (void) _task_ 0
{
.
.
.
if (os_delete_task (2))
{
printf ("Couldn't stop task 2\n");
}
.
.
.
}
RTX51 Tiny Function Library
/* ID of task to stop and delete */
/* for printf */

Advertisement

Table of Contents
loading

Table of Contents