Changeset 0451b44 in rtems


Ignore:
Timestamp:
Apr 15, 1998, 12:02:10 AM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
9b64c2d5
Parents:
7780978
Message:

Per suggestion from Eric Norum, went from one initial extension set
to multiple. This lets the stack check extension be installed
at system initialization time and avoids the BSP having to
even know about its existence.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/sapi/headers/confdefs.h

    r7780978 r0451b44  
    285285#endif
    286286
    287 #ifndef CONFIGURE_INITIAL_EXTENSIONS 
    288 #define CONFIGURE_INITIAL_EXTENSIONS         NULL
     287/*
     288 *  Initial Extension Set
     289 */
     290
     291#ifdef CONFIGURE_INIT
     292#ifdef STACK_CHECKER_ON
     293#include <stackchk.h>
     294#endif
     295
     296rtems_extensions_table Configuration_Initial_Extensions[] = {
     297#ifdef CONFIGURE_INITIAL_EXTENSIONS
     298    CONFIGURE_INITIAL_EXTENSIONS,
     299#endif
     300#ifdef STACK_CHECKER_ON
     301    STACK_CHECKER_EXTENSION,
     302#endif
     303    { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
     304};
     305
     306#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
     307  ((sizeof(Configuration_Initial_Extensions) / \
     308    sizeof(rtems_extensions_table)) - 1)
     309
    289310#endif
    290311
     
    531552    sizeof(rtems_driver_address_table),      /* number of device drivers */
    532553  Device_drivers,                            /* pointer to driver table */
    533   CONFIGURE_INITIAL_EXTENSIONS,              /* pointer to initial extensions */
     554  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
     555  Configuration_Initial_Extensions,          /* pointer to initial extensions */
    534556  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
    535557  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
  • c/src/exec/sapi/headers/config.h

    r7780978 r0451b44  
    8282  unsigned32                        number_of_device_drivers;
    8383  rtems_driver_address_table       *Device_driver_table;
     84  unsigned32                        number_of_initial_extensions;
    8485  rtems_extensions_table           *User_extension_table;
    8586  rtems_multiprocessing_table      *User_multiprocessing_table;
  • c/src/exec/sapi/include/confdefs.h

    r7780978 r0451b44  
    285285#endif
    286286
    287 #ifndef CONFIGURE_INITIAL_EXTENSIONS 
    288 #define CONFIGURE_INITIAL_EXTENSIONS         NULL
     287/*
     288 *  Initial Extension Set
     289 */
     290
     291#ifdef CONFIGURE_INIT
     292#ifdef STACK_CHECKER_ON
     293#include <stackchk.h>
     294#endif
     295
     296rtems_extensions_table Configuration_Initial_Extensions[] = {
     297#ifdef CONFIGURE_INITIAL_EXTENSIONS
     298    CONFIGURE_INITIAL_EXTENSIONS,
     299#endif
     300#ifdef STACK_CHECKER_ON
     301    STACK_CHECKER_EXTENSION,
     302#endif
     303    { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
     304};
     305
     306#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
     307  ((sizeof(Configuration_Initial_Extensions) / \
     308    sizeof(rtems_extensions_table)) - 1)
     309
    289310#endif
    290311
     
    531552    sizeof(rtems_driver_address_table),      /* number of device drivers */
    532553  Device_drivers,                            /* pointer to driver table */
    533   CONFIGURE_INITIAL_EXTENSIONS,              /* pointer to initial extensions */
     554  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
     555  Configuration_Initial_Extensions,          /* pointer to initial extensions */
    534556  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
    535557  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
  • c/src/exec/sapi/include/rtems/config.h

    r7780978 r0451b44  
    8282  unsigned32                        number_of_device_drivers;
    8383  rtems_driver_address_table       *Device_driver_table;
     84  unsigned32                        number_of_initial_extensions;
    8485  rtems_extensions_table           *User_extension_table;
    8586  rtems_multiprocessing_table      *User_multiprocessing_table;
  • c/src/exec/sapi/src/exinit.c

    r7780978 r0451b44  
    150150  _Thread_Dispatch_initialization();
    151151
    152   _User_extensions_Handler_initialization(
    153     configuration_table->User_extension_table
    154   );
    155 
    156152  _Workspace_Handler_initialization(
    157153     (void *)configuration_table->work_space_start,
    158154     configuration_table->work_space_size
     155  );
     156
     157  _User_extensions_Handler_initialization(
     158    configuration_table->number_of_initial_extensions,
     159    configuration_table->User_extension_table
    159160  );
    160161
  • c/src/exec/score/headers/userext.h

    r7780978 r0451b44  
    102102
    103103/*
    104  *  The following contains the static extension set which may be
    105  *  configured by the application.
    106  */
    107 
    108 SCORE_EXTERN User_extensions_Control _User_extensions_Initial;
    109 
    110 /*
    111104 *  The following is used to manage the list of active extensions.
    112105 */
  • c/src/exec/score/include/rtems/score/userext.h

    r7780978 r0451b44  
    102102
    103103/*
    104  *  The following contains the static extension set which may be
    105  *  configured by the application.
    106  */
    107 
    108 SCORE_EXTERN User_extensions_Control _User_extensions_Initial;
    109 
    110 /*
    111104 *  The following is used to manage the list of active extensions.
    112105 */
  • c/src/exec/score/inline/rtems/score/userext.inl

    r7780978 r0451b44  
    1818#define __USER_EXTENSIONS_inl
    1919
     20#include <rtems/score/wkspace.h>
     21
    2022/*PAGE
    2123 *
     
    2830
    2931RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization (
     32    unsigned32              number_of_extensions,
    3033    User_extensions_Table  *initial_extensions
    3134)
    3235{
     36  User_extensions_Control *extension;
     37  unsigned32               i;
     38
    3339  _Chain_Initialize_empty( &_User_extensions_List );
    3440
    3541  if ( initial_extensions ) {
    36     _User_extensions_Initial.Callouts = *initial_extensions;
    37     _Chain_Append( &_User_extensions_List, &_User_extensions_Initial.Node );
     42    for (i=0 ; i<number_of_extensions ; i++ ) {
     43      extension =
     44         _Workspace_Allocate_or_fatal_error( sizeof(User_extensions_Control) );
     45
     46      extension->Callouts = initial_extensions[i];
     47      _Chain_Append( &_User_extensions_List, &extension->Node );
     48    }
    3849  }
    3950}
  • c/src/exec/score/inline/userext.inl

    r7780978 r0451b44  
    1818#define __USER_EXTENSIONS_inl
    1919
     20#include <rtems/score/wkspace.h>
     21
    2022/*PAGE
    2123 *
     
    2830
    2931RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization (
     32    unsigned32              number_of_extensions,
    3033    User_extensions_Table  *initial_extensions
    3134)
    3235{
     36  User_extensions_Control *extension;
     37  unsigned32               i;
     38
    3339  _Chain_Initialize_empty( &_User_extensions_List );
    3440
    3541  if ( initial_extensions ) {
    36     _User_extensions_Initial.Callouts = *initial_extensions;
    37     _Chain_Append( &_User_extensions_List, &_User_extensions_Initial.Node );
     42    for (i=0 ; i<number_of_extensions ; i++ ) {
     43      extension =
     44         _Workspace_Allocate_or_fatal_error( sizeof(User_extensions_Control) );
     45
     46      extension->Callouts = initial_extensions[i];
     47      _Chain_Append( &_User_extensions_List, &extension->Node );
     48    }
    3849  }
    3950}
  • cpukit/sapi/include/confdefs.h

    r7780978 r0451b44  
    285285#endif
    286286
    287 #ifndef CONFIGURE_INITIAL_EXTENSIONS 
    288 #define CONFIGURE_INITIAL_EXTENSIONS         NULL
     287/*
     288 *  Initial Extension Set
     289 */
     290
     291#ifdef CONFIGURE_INIT
     292#ifdef STACK_CHECKER_ON
     293#include <stackchk.h>
     294#endif
     295
     296rtems_extensions_table Configuration_Initial_Extensions[] = {
     297#ifdef CONFIGURE_INITIAL_EXTENSIONS
     298    CONFIGURE_INITIAL_EXTENSIONS,
     299#endif
     300#ifdef STACK_CHECKER_ON
     301    STACK_CHECKER_EXTENSION,
     302#endif
     303    { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
     304};
     305
     306#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
     307  ((sizeof(Configuration_Initial_Extensions) / \
     308    sizeof(rtems_extensions_table)) - 1)
     309
    289310#endif
    290311
     
    531552    sizeof(rtems_driver_address_table),      /* number of device drivers */
    532553  Device_drivers,                            /* pointer to driver table */
    533   CONFIGURE_INITIAL_EXTENSIONS,              /* pointer to initial extensions */
     554  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
     555  Configuration_Initial_Extensions,          /* pointer to initial extensions */
    534556  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
    535557  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
  • cpukit/sapi/include/rtems/config.h

    r7780978 r0451b44  
    8282  unsigned32                        number_of_device_drivers;
    8383  rtems_driver_address_table       *Device_driver_table;
     84  unsigned32                        number_of_initial_extensions;
    8485  rtems_extensions_table           *User_extension_table;
    8586  rtems_multiprocessing_table      *User_multiprocessing_table;
  • cpukit/sapi/src/exinit.c

    r7780978 r0451b44  
    150150  _Thread_Dispatch_initialization();
    151151
    152   _User_extensions_Handler_initialization(
    153     configuration_table->User_extension_table
    154   );
    155 
    156152  _Workspace_Handler_initialization(
    157153     (void *)configuration_table->work_space_start,
    158154     configuration_table->work_space_size
     155  );
     156
     157  _User_extensions_Handler_initialization(
     158    configuration_table->number_of_initial_extensions,
     159    configuration_table->User_extension_table
    159160  );
    160161
  • cpukit/score/include/rtems/score/userext.h

    r7780978 r0451b44  
    102102
    103103/*
    104  *  The following contains the static extension set which may be
    105  *  configured by the application.
    106  */
    107 
    108 SCORE_EXTERN User_extensions_Control _User_extensions_Initial;
    109 
    110 /*
    111104 *  The following is used to manage the list of active extensions.
    112105 */
  • cpukit/score/inline/rtems/score/userext.inl

    r7780978 r0451b44  
    1818#define __USER_EXTENSIONS_inl
    1919
     20#include <rtems/score/wkspace.h>
     21
    2022/*PAGE
    2123 *
     
    2830
    2931RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization (
     32    unsigned32              number_of_extensions,
    3033    User_extensions_Table  *initial_extensions
    3134)
    3235{
     36  User_extensions_Control *extension;
     37  unsigned32               i;
     38
    3339  _Chain_Initialize_empty( &_User_extensions_List );
    3440
    3541  if ( initial_extensions ) {
    36     _User_extensions_Initial.Callouts = *initial_extensions;
    37     _Chain_Append( &_User_extensions_List, &_User_extensions_Initial.Node );
     42    for (i=0 ; i<number_of_extensions ; i++ ) {
     43      extension =
     44         _Workspace_Allocate_or_fatal_error( sizeof(User_extensions_Control) );
     45
     46      extension->Callouts = initial_extensions[i];
     47      _Chain_Append( &_User_extensions_List, &extension->Node );
     48    }
    3849  }
    3950}
Note: See TracChangeset for help on using the changeset viewer.