RTEMS Logo

RTEMS 4.9.2 On-Line Library


User Extensions Manager TASK_SWITCH Extension

PREV UP NEXT Bookshelf RTEMS C User's Guide

22.2.3.5: TASK_SWITCH Extension

The TASK_SWITCH extension corresponds to a task context switch. If this extension is defined in any static or dynamic extension set and a task context switch is in progress, then the extension routine will automatically be invoked by RTEMS. The extension should have a prototype similar to the following:

rtems_extension user_task_switch(
  rtems_tcb *current_task,
  rtems_tcb *heir_task
);

where current_task can be used to access the TCB for the task that is being swapped out, and heir_task can be used to access the TCB for the task being swapped in. This extension is invoked from RTEMS' dispatcher routine after the current_task context has been saved, but before the heir_task context has been restored. This extension should not call any RTEMS directives.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2008 OAR Corporation