RTEMS
userext.c
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2008.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
23 
25 {
26  const User_extensions_Table *initial_table;
27  User_extensions_Switch_control *initial_switch_controls;
28  size_t n;
29  size_t i;
30 
32  initial_switch_controls = _User_extensions_Initial_switch_controls;
34 
35  for ( i = 0 ; i < n ; ++i ) {
37 
38  callout = initial_table[ i ].thread_switch;
39 
40  if ( callout != NULL ) {
42 
43  c = &initial_switch_controls[ i ];
44  c->thread_switch = callout;
45  _Chain_Initialize_node( &c->Node );
47  }
48  }
49 }
Manages the switch callouts.
Definition: userextdata.h:39
static __inline__ void _Chain_Initialize_node(Chain_Node *the_node)
Initializes a chain node.
Definition: chainimpl.h:122
const size_t _User_extensions_Initial_count
The count of initial user extensions.
Chain_Control _User_extensions_Switches_list
List of active task switch extensions.
User Extension Handler API.
void(* User_extensions_thread_switch_extension)(struct _Thread_Control *executing, struct _Thread_Control *heir)
Task switch extension.
Definition: userext.h:154
const User_extensions_Table _User_extensions_Initial_extensions[]
The table of initial user extensions.
void _User_extensions_Handler_initialization(void)
Initializes the user extensions handler.
Definition: userext.c:24
static __inline__ void _Chain_Append_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Appends a node (unprotected).
Definition: chainimpl.h:680
User_extensions_Switch_control _User_extensions_Initial_switch_controls[]
A spare switch control for each initial user extension.
User extension table.
Definition: userext.h:230