RTEMS Logo

RTEMS 4.9.2 On-Line Library


Task Manager TASK_VARIABLE_GET - Obtain value of a per task variable

PREV UP NEXT Bookshelf RTEMS C User's Guide

5.4.18: TASK_VARIABLE_GET - Obtain value of a per task variable

CALLING SEQUENCE:

rtems_status_code rtems_task_variable_get(
  rtems_id  tid,
  void    **task_variable,
  void    **task_variable_value
);

DIRECTIVE STATUS CODES:

RTEMS_SUCCESSFUL - per task variable added successfully
RTEMS_INVALID_ADDRESS - task_variable is NULL
RTEMS_INVALID_ADDRESS - task_variable_value is NULL
RTEMS_INVALID_ADDRESS - task_variable is not found
RTEMS_NO_MEMORY - invalid task id
RTEMS_ILLEGAL_ON_REMOTE_OBJECT - not supported on remote tasks

DESCRIPTION:

This directive looks up the private value of a task variable for a specified task and stores that value in the location pointed to by the result argument. The specified task is usually not the calling task, which can get its private value by directly accessing the variable.

NOTES:

If you change memory which task_variable_value points to, remember to declare that memory as volatile, so that the compiler will optimize it correctly. In this case both the pointer task_variable_value and data referenced by task_variable_value should be considered volatile.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2008 OAR Corporation