The User Extensions Table is used to inform RTEMS of the optional user-supplied static extension set. This table contains one entry for each possible extension. The entries are called at critical times in the life of the system and individual tasks. The application may create dynamic extensions in addition to this single static set. The format of each entry in the User Extensions Table is defined in the following C structure:
typedef void rtems_extension; typedef rtems_extension (*rtems_task_create_extension)( Thread_Control * /* executing */, Thread_Control * /* created */ ); typedef rtems_extension (*rtems_task_delete_extension)( Thread_Control * /* executing */, Thread_Control * /* deleted */ ); typedef rtems_extension (*rtems_task_start_extension)( Thread_Control * /* executing */, Thread_Control * /* started */ ); typedef rtems_extension (*rtems_task_restart_extension)( Thread_Control * /* executing */, Thread_Control * /* restarted */ ); typedef rtems_extension (*rtems_task_switch_extension)( Thread_Control * /* executing */, Thread_Control * /* heir */ ); typedef rtems_extension (*rtems_task_begin_extension)( Thread_Control * /* beginning */ ); typedef rtems_extension (*rtems_task_exitted_extension)( Thread_Control * /* exiting */ ); typedef rtems_extension (*rtems_fatal_extension)( Internal_errors_Source /* the_source */, boolean /* is_internal */, uint32_t /* the_error */ ); typedef struct { rtems_task_create_extension thread_create; rtems_task_start_extension thread_start; rtems_task_restart_extension thread_restart; rtems_task_delete_extension thread_delete; rtems_task_switch_extension thread_switch; rtems_task_begin_extension thread_begin; rtems_task_exitted_extension thread_exitted; rtems_fatal_extension fatal; } rtems_extensions_table;
rtems.fatal_error_occurred
directive. If the user's fatal error handler returns or if this
entry is NULL then the default RTEMS fatal error handler will be
executed.
A typical declaration for a User Extension Table which defines the TASK_CREATE, TASK_DELETE, TASK_SWITCH, and FATAL extension might appear as follows:
rtems_extensions_table User_extensions = { task_create_extension, NULL, NULL, task_delete_extension, task_switch_extension, NULL, NULL, fatal_extension };
More information regarding the user extensions is provided in the User Extensions chapter.
Copyright © 1988-2007OAR Corporation