Keil Logo

os_delete_task

Summary
#include <rtx51tny.h>

char os_delete_task (
  unsigned char task_id);       /* task to delete */
Description

The os_delete_task function stops the task specified by task_id and removes it from the task list.

Note

  • This function is part of the RTX51 Tiny Real-Time Operating System which is included only with the PK51 Professional Developer's Kit.
Return Value

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 has not been started.

Note

  • A task switch is performed immediately if a task deletes itself.
See Also

os_create_task

Example
#include <rtx51tny.h>
#include <stdio.h>            /* for printf */

void tst_os_delete_task (void) _task_ 0
{
.
.
.
if (os_delete_task (2))
  {
  printf ("Couldn't stop task 2\n");
  }
.
.
.
}

Related Knowledgebase Articles

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.