RTEMS Logo

RTEMS 4.9.2 On-Line Library


Task Manager TASK_SUSPEND - Suspend a task

PREV UP NEXT Bookshelf RTEMS C User's Guide

5.4.7: TASK_SUSPEND - Suspend a task

CALLING SEQUENCE:

rtems_status_code rtems_task_suspend(
  rtems_id id
);

DIRECTIVE STATUS CODES:

RTEMS_SUCCESSFUL - task restarted successfully
RTEMS_INVALID_ID - task id invalid
RTEMS_ALREADY_SUSPENDED - task already suspended

DESCRIPTION:

This directive suspends the task specified by id from further execution by placing it in the suspended state. This state is additive to any other blocked state that the task may already be in. The task will not execute again until another task issues the rtems_task_resume directive for this task and any blocked state has been removed.

NOTES:

The requesting task can suspend itself by specifying RTEMS_SELF as id. In this case, the task will be suspended and a successful return code will be returned when the task is resumed.

Suspending a global task which does not reside on the local node will generate a request to the remote node to suspend the specified task.

If the task specified by id is already suspended, then the RTEMS_ALREADY_SUSPENDED status code is returned.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2008 OAR Corporation