Changeset 976162a6 in rtems


Ignore:
Timestamp:
Dec 3, 2007, 10:23:13 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
2f1d801
Parents:
3e066540
Message:

2007-12-03 Joel Sherrill <joel.sherrill@…>

  • libcsupport/src/malloc.c, libmisc/monitor/mon-command.c, posix/preinstall.am, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c, posix/src/mutexdestroy.c, posix/src/mutexinit.c, posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/include/rtems/sptables.h, sapi/src/exinit.c, score/include/rtems/system.h, score/include/rtems/score/mpci.h, score/src/mpci.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Moved most of the remaining CPU Table fields to the Configuration Table. This included pretasking_hook, predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace, extra_mpci_receive_server_stack, stack_allocate_hook, and stack_free_hook. As a side-effect of this effort some multiprocessing code was made conditional and some style clean up occurred.
Location:
cpukit
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r3e066540 r976162a6  
     12007-12-03      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * libcsupport/src/malloc.c, libmisc/monitor/mon-command.c,
     4        posix/preinstall.am, posix/include/rtems/posix/cond.h,
     5        posix/include/rtems/posix/mqueue.h,
     6        posix/include/rtems/posix/mutex.h,
     7        posix/include/rtems/posix/pthread.h,
     8        posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c,
     9        posix/src/mutexdestroy.c, posix/src/mutexinit.c,
     10        posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c,
     11        sapi/include/confdefs.h, sapi/include/rtems/config.h,
     12        sapi/include/rtems/init.h, sapi/include/rtems/sptables.h,
     13        sapi/src/exinit.c, score/include/rtems/system.h,
     14        score/include/rtems/score/mpci.h, score/src/mpci.c,
     15        score/src/thread.c, score/src/threadcreateidle.c,
     16        score/src/threadstackallocate.c, score/src/threadstackfree.c,
     17        score/src/wkspace.c: Moved most of the remaining CPU Table fields to
     18        the Configuration Table. This included pretasking_hook,
     19        predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace,
     20        extra_mpci_receive_server_stack, stack_allocate_hook, and
     21        stack_free_hook. As a side-effect of this effort some multiprocessing
     22        code was made conditional and some style clean up occurred.
     23
    1242007-12-03      Chris Johns <chrisj@rtems.org>
    225
  • cpukit/libcsupport/src/malloc.c

    r3e066540 r976162a6  
    176176   */
    177177
    178   if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
     178  if ( rtems_configuration_get_do_zero_of_workspace() )
    179179     memset( starting_address, 0, length );
    180180
  • cpukit/libmisc/monitor/mon-command.c

    r3e066540 r976162a6  
    499499   * put node number in the prompt if we are multiprocessing
    500500   */
     501#if defined(RTEMS_MULTIPROCESSING)
    501502  if (!rtems_configuration_get_user_multiprocessing_table ())
    502503    sprintf (monitor_prompt, "%s",
    503504             (env_prompt == NULL) ? MONITOR_PROMPT: env_prompt);
    504   else if (rtems_monitor_default_node != rtems_monitor_node)
     505  else /* .... */
     506#endif
     507  if (rtems_monitor_default_node != rtems_monitor_node)
    505508    sprintf (monitor_prompt, "%" PRId32 "-%s-%" PRId32 "", rtems_monitor_node,
    506509             (env_prompt == NULL) ? MONITOR_PROMPT : env_prompt,
  • cpukit/posix/include/rtems/posix/cond.h

    r3e066540 r976162a6  
    160160
    161161#include <rtems/posix/cond.inl>
    162 #if defined(RTEMS_MULTIPROCESSING)
    163 #include <rtems/posix/condmp.h>
    164 #endif
    165162
    166163#ifdef __cplusplus
  • cpukit/posix/include/rtems/posix/mqueue.h

    r3e066540 r976162a6  
    240240
    241241#include <rtems/posix/mqueue.inl>
    242 #if defined(RTEMS_MULTIPROCESSING)
    243 #include <rtems/posix/mqueuemp.h>
    244 #endif
    245242
    246243#ifdef __cplusplus
  • cpukit/posix/include/rtems/posix/mutex.h

    r3e066540 r976162a6  
    149149
    150150#include <rtems/posix/mutex.inl>
    151 #if defined(RTEMS_MULTIPROCESSING)
    152 #include <rtems/posix/mutexmp.h>
    153 #endif
    154151
    155152#ifdef __cplusplus
  • cpukit/posix/include/rtems/posix/pthread.h

    r3e066540 r976162a6  
    142142
    143143#include <rtems/posix/pthread.inl>
    144 #if defined(RTEMS_MULTIPROCESSING)
    145 #include <rtems/posix/pthreadmp.h>
    146 #endif
    147144
    148145#ifdef __cplusplus
  • cpukit/posix/include/rtems/posix/semaphore.h

    r3e066540 r976162a6  
    186186
    187187#include <rtems/posix/semaphore.inl>
    188 #if defined(RTEMS_MULTIPROCESSING)
    189 #include <rtems/posix/semaphoremp.h>
    190 #endif
    191188
    192189#ifdef __cplusplus
  • cpukit/posix/preinstall.am

    r3e066540 r976162a6  
    99DISTCLEANFILES = $(PREINSTALL_DIRS)
    1010
     11all-local: $(TMPINSTALL_FILES)
     12
     13TMPINSTALL_FILES =
     14CLEANFILES = $(TMPINSTALL_FILES)
     15
    1116all-am: $(PREINSTALL_FILES)
    1217
    1318PREINSTALL_FILES =
    14 CLEANFILES = $(PREINSTALL_FILES)
     19CLEANFILES += $(PREINSTALL_FILES)
     20
     21$(PROJECT_LIB)/$(dirstamp):
     22        @$(MKDIR_P) $(PROJECT_LIB)
     23        @: > $(PROJECT_LIB)/$(dirstamp)
     24PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
    1525
    1626$(PROJECT_INCLUDE)/$(dirstamp):
     
    2030
    2131if LIBPOSIX
     32$(PROJECT_LIB)/libposix.a: libposix.a $(PROJECT_LIB)/$(dirstamp)
     33        $(INSTALL_DATA) $< $(PROJECT_LIB)/libposix.a
     34TMPINSTALL_FILES += $(PROJECT_LIB)/libposix.a
     35
    2236if HAS_PTHREADS
    2337$(PROJECT_INCLUDE)/sched.h: include/sched.h $(PROJECT_INCLUDE)/$(dirstamp)
  • cpukit/posix/src/conddestroy.c

    r3e066540 r976162a6  
    4747
    4848      _POSIX_Condition_variables_Free( the_cond );
    49 
    50 #if defined(RTEMS_MULTIPROCESSING)
    51       if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
    52 
    53         _Objects_MP_Close(
    54           &_POSIX_Condition_variables_Information,
    55           the_cond->Object.id
    56         );
    57 
    58         _POSIX_Condition_variables_MP_Send_process_packet(
    59           POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE,
    60           the_cond->Object.id,
    61           0,                         /* Not used */
    62           0                          /* Not used */
    63         );
    64       }
    65 #endif
    6649      _Thread_Enable_dispatch();
    6750      return 0;
  • cpukit/posix/src/mutexdestroy.c

    r3e066540 r976162a6  
    1313#include <rtems/score/coremutex.h>
    1414#include <rtems/score/watchdog.h>
    15 #if defined(RTEMS_MULTIPROCESSING)
    16 #include <rtems/score/mpci.h>
    17 #endif
    1815#include <rtems/posix/mutex.h>
    1916#include <rtems/posix/priority.h>
     
    4845      _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
    4946
    50       _CORE_mutex_Flush(
    51         &the_mutex->Mutex,
    52 #if defined(RTEMS_MULTIPROCESSING)
    53         _POSIX_Mutex_MP_Send_object_was_deleted,
    54 #else
    55         NULL,
    56 #endif
    57         EINVAL
    58       );
     47      _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
    5948
    6049      _POSIX_Mutex_Free( the_mutex );
    61 
    62 #if defined(RTEMS_MULTIPROCESSING)
    63       if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) {
    64 
    65         _Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id );
    66 
    67         _POSIX_Mutex_MP_Send_process_packet(
    68           POSIX_MUTEX_MP_ANNOUNCE_DELETE,
    69           the_mutex->Object.id,
    70           0,                         /* Not used */
    71           0                          /* Not used */
    72         );
    73       }
    74 #endif
    7550      _Thread_Enable_dispatch();
    7651      return 0;
  • cpukit/posix/src/mutexinit.c

    r3e066540 r976162a6  
    1414#include <rtems/score/coremutex.h>
    1515#include <rtems/score/watchdog.h>
    16 #if defined(RTEMS_MULTIPROCESSING)
    17 #include <rtems/score/mpci.h>
    18 #endif
    1916#include <rtems/posix/mutex.h>
    2017#include <rtems/posix/priority.h>
     
    133130  }
    134131
    135 #if defined(RTEMS_MULTIPROCESSING)
    136   if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
    137        !( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0,
    138                             the_mutex->Object.id, FALSE ) ) ) {
    139     _POSIX_Mutex_Free( the_mutex );
    140     _Thread_Enable_dispatch();
    141     return EAGAIN;
    142   }
    143 #endif
    144 
    145132  the_mutex->process_shared = the_attr->process_shared;
    146133
     
    170157  *mutex = the_mutex->Object.id;
    171158
    172 #if defined(RTEMS_MULTIPROCESSING)
    173   if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
    174     _POSIX_Mutex_MP_Send_process_packet(
    175       POSIX_MUTEX_MP_ANNOUNCE_CREATE,
    176       the_mutex->Object.id,
    177       0,                         /* Name not used */
    178       0                          /* Not used */
    179     );
    180 #endif
    181 
    182159  _Thread_Enable_dispatch();
    183160  return 0;
  • cpukit/posix/src/mutexsetprioceiling.c

    r3e066540 r976162a6  
    1313#include <rtems/score/coremutex.h>
    1414#include <rtems/score/watchdog.h>
    15 #if defined(RTEMS_MULTIPROCESSING)
    16 #include <rtems/score/mpci.h>
    17 #endif
    1815#include <rtems/posix/mutex.h>
    1916#include <rtems/posix/priority.h>
     
    6360        &the_mutex->Mutex,
    6461        the_mutex->Object.id,
    65 #if defined(RTEMS_MULTIPROCESSING)
    66         _POSIX_Threads_mutex_MP_support
    67 #else
    6862        NULL
    69 #endif
    7063      );
    7164      _Thread_Enable_dispatch();
  • cpukit/posix/src/mutexunlock.c

    r3e066540 r976162a6  
    4242        &the_mutex->Mutex,
    4343        the_mutex->Object.id,
    44 #if defined(RTEMS_MULTIPROCESSING)
    45         _POSIX_Threads_mutex_MP_support
    46 #else
    4744        NULL
    48 #endif
    4945      );
    5046      _Thread_Enable_dispatch();
  • cpukit/sapi/include/confdefs.h

    r3e066540 r976162a6  
    5353extern rtems_driver_address_table       Device_drivers[];
    5454extern rtems_configuration_table        Configuration;
    55 extern rtems_multiprocessing_table      Multiprocessing_configuration;
     55#if defined(RTEMS_MULTIPROCESSING)
     56  extern rtems_multiprocessing_table      Multiprocessing_configuration;
     57#endif
    5658#ifdef RTEMS_POSIX_API
    5759extern posix_api_configuration_table    Configuration_POSIX_API;
     
    178180
    179181/*
     182 *  Idle task body configuration
     183 *
     184 *  There is a default IDLE thread body provided by RTEMS which
     185 *  has the possibility of being CPU specific.  There may be a
     186 *  BSP specific override of the RTEMS default body and in turn,
     187 *  the application may override and provide its own.
     188 */
     189#ifndef CONFIGURE_IDLE_TASK_BODY
     190  #ifdef BSP_IDLE_TASK_BODY
     191    #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
     192  #else
     193    #define CONFIGURE_IDLE_TASK_BODY NULL
     194  #endif
     195#endif
     196
     197/*
     198 *  Idle task stack size configuration
     199 *
     200 *  By default, the IDLE task will have a stack of minimum size.
     201 *  The BSP or application may override this value.
     202 */
     203#ifndef CONFIGURE_IDLE_TASK_STACK_SIZE
     204  #ifdef BSP_IDLE_TASK_STACK_SIZE
     205    #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE
     206  #else
     207    #define CONFIGURE_IDLE_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
     208  #endif
     209#endif
     210
     211/*
     212 *  Task stack allocator configuration
     213 */
     214
     215#ifndef CONFIGURE_TASK_STACK_ALLOCATOR
     216  #define CONFIGURE_TASK_STACK_ALLOCATOR NULL
     217#endif
     218
     219#ifndef CONFIGURE_TASK_STACK_DEALLOCATOR
     220  #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL
     221#endif
     222
     223/*
     224 *  Should the RTEMS Workspace and C Program Heap be cleared automatically
     225 *  at system start up?
     226 */
     227
     228#ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
     229  #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY
     230    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \
     231            BSP_ZERO_WORKSPACE_AUTOMATICALLY
     232  #else
     233    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE
     234  #endif
     235#endif
     236
     237/*
    180238 *  Default User Initialization Task Table.  This table guarantees that
    181239 *  one user initialization table is defined.
     
    400458#endif /* CONFIGURE_HAS_OWN_BDBUF_TABLE        */
    401459#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
     460
     461#if defined(RTEMS_MULTIPROCESSING)
    402462/*
    403463 *  Default Multiprocessing Configuration Table.  The defaults are
     
    449509
    450510#endif /* CONFIGURE_MP_APPLICATION */
     511#endif /* RTEMS_MULTIPROCESSING */
    451512
    452513/*
     
    11791240rtems_configuration_table Configuration = {
    11801241  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
    1181   CONFIGURE_EXECUTIVE_RAM_SIZE,
     1242  CONFIGURE_EXECUTIVE_RAM_SIZE,              /* required RTEMS workspace */
    11821243  CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION +
    1183       CONFIGURE_STACK_CHECKER_EXTENSION,
    1184   CONFIGURE_MICROSECONDS_PER_TICK,
    1185   CONFIGURE_TICKS_PER_TIMESLICE,
    1186   CONFIGURE_MAXIMUM_DRIVERS,
    1187   CONFIGURE_NUMBER_OF_DRIVERS,               /* number of device drivers */
     1244      CONFIGURE_STACK_CHECKER_EXTENSION,     /* maximum user extensions */
     1245  CONFIGURE_MICROSECONDS_PER_TICK,           /* microseconds per clock tick */
     1246  CONFIGURE_TICKS_PER_TIMESLICE,             /* ticks per timeslice quantum */
     1247  CONFIGURE_IDLE_TASK_BODY,                  /* user's IDLE task */
     1248  CONFIGURE_IDLE_TASK_STACK_SIZE,            /* IDLE task stack size */
     1249  CONFIGURE_TASK_STACK_ALLOCATOR,            /* stack allocator */
     1250  CONFIGURE_TASK_STACK_DEALLOCATOR,          /* stack deallocator */
     1251  CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY,    /* true to clear memory */
     1252  CONFIGURE_MAXIMUM_DRIVERS,                 /* maximum device drivers */
     1253  CONFIGURE_NUMBER_OF_DRIVERS,               /* static device drivers */
    11881254  Device_drivers,                            /* pointer to driver table */
    11891255  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
    11901256  CONFIGURE_INITIAL_EXTENSION_TABLE,         /* pointer to initial extensions */
     1257#if defined(RTEMS_MULTIPROCESSING)
    11911258  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
     1259#endif
    11921260  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
    11931261#ifdef RTEMS_POSIX_API
  • cpukit/sapi/include/rtems/config.h

    r3e066540 r976162a6  
    7070#endif
    7171
     72#if defined(RTEMS_MULTIPROCESSING)
    7273/*
    7374 *  The following records define the Multiprocessor Configuration
     
    7677 *  system.
    7778 */
    78 
    7979typedef struct {
    80   uint32_t      node;             /* local node number */
    81   uint32_t      maximum_nodes;    /* maximum # nodes in system */
    82   uint32_t      maximum_global_objects; /* maximum # global objects */
    83   uint32_t      maximum_proxies;  /* maximum # proxies */
    84 #if defined(RTEMS_MULTIPROCESSING)
     80  uint32_t            node;                   /* local node number */
     81  uint32_t            maximum_nodes;          /* maximum # nodes in system */
     82  uint32_t            maximum_global_objects; /* maximum # global objects */
     83  uint32_t            maximum_proxies;        /* maximum # proxies */
     84
     85  /** The MPCI Receive server is assumed to have a stack of at least
     86   *  minimum stack size.  This field specifies the amount of extra
     87   *  stack this task will be given in bytes.
     88   */
     89  uint32_t            extra_mpci_receive_server_stack;
     90
    8591  rtems_mpci_table   *User_mpci_table;  /* pointer to MPCI table */
    86 #else
    87   void         *User_mpci_table;        /* pointer to MPCI table */
    88 #endif
    8992} rtems_multiprocessing_table;
     93#endif
    9094
    9195/*
     
    100104 *     + required number of each object type for each API configured
    101105 */
    102 
    103106typedef struct {
    104107  void                          *work_space_start;
     
    107110  uint32_t                       microseconds_per_tick;
    108111  uint32_t                       ticks_per_timeslice;
     112
     113  /** This element points to the BSP's optional idle task which may override
     114   *  the default one provided with RTEMS.
     115   */
     116  void                         (*idle_task)( void );
     117
     118  /** This field specifies the size of the IDLE task's stack.  If less than or
     119   *  equal to the minimum stack size, then the IDLE task will have the minimum
     120   *  stack size.
     121   */
     122  uint32_t                       idle_task_stack_size;
     123
     124  /** The BSP may want to provide it's own stack allocation routines.
     125   *  In this case, the BSP will provide this stack allocation hook.
     126   */
     127  void *                       (*stack_allocate_hook)( uint32_t );
     128
     129  /** The BSP may want to provide it's own stack free routines.
     130   *  In this case, the BSP will provide this stack free hook.
     131   */
     132  void                         (*stack_free_hook)( void *);
     133
     134  /** If this element is TRUE, then RTEMS will zero the Executive Workspace.
     135   *  When this element is FALSE, it is assumed that the BSP or invoking
     136   *  environment has ensured that memory was cleared before RTEMS was
     137   *  invoked.
     138   */
     139  boolean                        do_zero_of_workspace;
     140
    109141  uint32_t                       maximum_drivers;
    110142  uint32_t                       number_of_device_drivers;
     
    112144  uint32_t                       number_of_initial_extensions;
    113145  rtems_extensions_table        *User_extension_table;
     146#if defined(RTEMS_MULTIPROCESSING)
    114147  rtems_multiprocessing_table   *User_multiprocessing_table;
     148#endif
    115149  rtems_api_configuration_table *RTEMS_api_configuration;
    116150  posix_api_configuration_table *POSIX_api_configuration;
     
    153187        (_Configuration_Table->ticks_per_timeslice)
    154188
     189/**
     190  * This macro assists in accessing the field which indicates whether
     191  * RTEMS is responsible for zeroing the Executive Workspace.
     192  */
     193#define rtems_configuration_get_do_zero_of_workspace() \
     194   (_Configuration_Table->do_zero_of_workspace)
     195
    155196#define rtems_configuration_get_maximum_devices() \
    156197        (_Configuration_Table->maximum_devices)
  • cpukit/sapi/include/rtems/init.h

    r3e066540 r976162a6  
    3737#include <rtems/rtems/intr.h>
    3838
     39#if defined(RTEMS_MULTIPROCESSING)
    3940/*
    4041 *  The following defines the default Multiprocessing Configuration
     
    4445extern const rtems_multiprocessing_table
    4546  _Initialization_Default_multiprocessing_table;
     47#endif
    4648
    4749/*
  • cpukit/sapi/include/rtems/sptables.h

    r3e066540 r976162a6  
    4848#include <rtems/rtems/timer.h>
    4949
     50#if defined(RTEMS_MULTIPROCESSING)
    5051/*
    5152 *  This is the default Multiprocessing Configuration Table.
    5253 *  It is used in single processor configurations.
    5354 */
    54 
    55 #if defined(SAPI_INIT)
    56 const rtems_multiprocessing_table
    57        _Initialization_Default_multiprocessing_table = {
    58   1,                      /* local node number */
    59   1,                      /* maximum number nodes in system */
    60   0,                      /* maximum number global objects */
    61   0,                      /* maximum number proxies */
    62   NULL,                   /* pointer to MPCI address table */
    63 };
    64 #else
    65 extern const rtems_multiprocessing_table
    66        _Initialization_Default_multiprocessing_table;
     55  #if defined(SAPI_INIT)
     56    const rtems_multiprocessing_table
     57           _Initialization_Default_multiprocessing_table = {
     58      1,                      /* local node number */
     59      1,                      /* maximum number nodes in system */
     60      0,                      /* maximum number global objects */
     61      0,                      /* maximum number proxies */
     62      NULL,                   /* pointer to MPCI address table */
     63    };
     64  #else
     65    extern const rtems_multiprocessing_table
     66           _Initialization_Default_multiprocessing_table;
     67  #endif
    6768#endif
    6869
  • cpukit/sapi/src/exinit.c

    r3e066540 r976162a6  
    9393    );
    9494
     95  /*
     96   *  Grab our own copy of the user's CPU table.
     97   */
     98  _CPU_Table = *cpu_table;
     99
     100  /*
     101   *  Provide pointers just for later convenience.
     102   */
     103  _Configuration_Table    = configuration_table;
     104
     105  /*
     106   * Initialize any target architecture specific support as early as possible
     107   */
     108  _CPU_Initialize( cpu_table, _Thread_Dispatch );
     109
    95110#if defined(RTEMS_MULTIPROCESSING)
    96111  /*
     
    113128
    114129  /*
    115    *  Grab our own copy of the user's CPU table.
    116    */
    117   _CPU_Table = *cpu_table;
    118 
    119   /*
    120    *  Provide pointers just for later convenience.
    121    */
    122   _Configuration_Table    = configuration_table;
    123 
    124   _CPU_Initialize( cpu_table, _Thread_Dispatch );
    125 
    126   /*
    127130   *  Do this as early as possible to insure no debugging output
    128131   *  is even attempted to be printed.
     
    174177#if defined(RTEMS_MULTIPROCESSING)
    175178    ,
    176     multiprocessing_table->maximum_proxies
     179    _Configuration_MP_table->maximum_proxies
    177180#endif
    178181  );
     
    180183#if defined(RTEMS_MULTIPROCESSING)
    181184  _MPCI_Handler_initialization(
    182     multiprocessing_table->User_mpci_table,
     185    _Configuration_MP_table->User_mpci_table,
    183186    RTEMS_TIMEOUT
    184187  );
     
    221224   */
    222225
    223   if ( cpu_table->pretasking_hook )
    224     (*cpu_table->pretasking_hook)();
     226  {
     227    extern void bsp_pretasking_hook(void);
     228    bsp_pretasking_hook();
     229  }
    225230
    226231#if defined(RTEMS_MULTIPROCESSING)
     
    234239  _API_extensions_Run_predriver();
    235240
    236   if ( _CPU_Table.predriver_hook )
    237     (*_CPU_Table.predriver_hook)();
     241  {
     242    extern void bsp_predriver_hook(void);
     243    bsp_predriver_hook();
     244  }
    238245
    239246  /*
     
    262269  _API_extensions_Run_postdriver();
    263270
    264   if ( _CPU_Table.postdriver_hook )
    265     (*_CPU_Table.postdriver_hook)();
     271  {
     272    extern void bsp_postdriver_hook(void);
     273    bsp_postdriver_hook();
     274  }
    266275
    267276  return bsp_level;
  • cpukit/score/include/rtems/score/mpci.h

    r3e066540 r976162a6  
    4242#include <rtems/score/watchdog.h>
    4343#include <rtems/score/coresem.h>
    44 
    45 /**
    46  *  The following constants define the stack size requirements for
    47  *  the system threads.
    48  */
    49 #define MPCI_RECEIVE_SERVER_STACK_SIZE \
    50   ( STACK_MINIMUM_SIZE + \
    51     CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \
    52     _CPU_Table.extra_mpci_receive_server_stack \
    53   )
    5444
    5545/**
  • cpukit/score/include/rtems/system.h

    r3e066540 r976162a6  
    200200#define rtems_cpu_configuration_get_table() (&_CPU_Table)
    201201
    202 
    203202/** This macro assists in accessing the pretasking BSP hook. */
    204203#define rtems_cpu_configuration_get_pretasking_hook() \
     
    213212   (_CPU_Table.postdriver_hook)
    214213
    215 /** This macro assists in accessing the BSP specific IDLE task entry point. */
    216 #define rtems_cpu_configuration_get_idle_task() \
    217    (_CPU_Table.idle_task)
    218 
    219 /**
    220   * This macro assists in accessing the field which indicates whether
    221   * RTEMS is responsible for zeroing the Executive Workspace.
    222   */
    223 #define rtems_cpu_configuration_get_do_zero_of_workspace() \
    224    (_CPU_Table.do_zero_of_workspace)
    225 
    226 /** This macro assists in accessing the IDLE task stack point size. */
    227 #define rtems_cpu_configuration_get_idle_task_stack_size() \
    228    (_CPU_Table.idle_task_stack_size)
    229 
    230214/** This macro assists in accessing the interrupt stack size. */
    231215#define rtems_cpu_configuration_get_interrupt_stack_size() \
    232216   (_CPU_Table.interrupt_stack_size)
    233217
    234 /** This macro assists in accessing the size of the MPCI receiver server. */
    235 #define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
    236    (_CPU_Table.extra_mpci_receive_server_stack)
    237 
    238 /** This macro assists in accessing the BSP stack allocation hook. */
    239 #define rtems_cpu_configuration_get_stack_allocate_hook() \
    240    (_CPU_Table.stack_allocate_hook)
    241 
    242 /** This macro assists in accessing the BSP stack allocation free hook. */
    243 #define rtems_cpu_configuration_get_stack_free_hook() \
    244    (_CPU_Table.stack_free_hook)
    245 
    246218/** This macro defines the maximum length of a Classic API name. */
    247219#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
  • cpukit/score/src/mpci.c

    r3e066540 r976162a6  
    1818
    1919#include <rtems/system.h>
    20 #include <rtems/score/cpu.h>
    21 #include <rtems/score/interr.h>
    2220#if defined(RTEMS_MULTIPROCESSING)
    2321#include <rtems/score/mpci.h>
    2422#include <rtems/score/mppkt.h>
    2523#endif
     24#include <rtems/score/cpu.h>
     25#include <rtems/score/interr.h>
    2626#include <rtems/score/states.h>
    2727#include <rtems/score/thread.h>
     
    3232
    3333#include <rtems/score/coresem.h>
     34#include <rtems/config.h>
    3435
    3536/*PAGE
     
    113114    _MPCI_Receive_server_tcb,
    114115    NULL,        /* allocate the stack */
    115     MPCI_RECEIVE_SERVER_STACK_SIZE,
     116    STACK_MINIMUM_SIZE +
     117      CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK +
     118      _Configuration_MP_table->extra_mpci_receive_server_stack,
    116119    CPU_ALL_TASKS_ARE_FP,
    117120    PRIORITY_MINIMUM,
  • cpukit/score/src/thread.c

    r3e066540 r976162a6  
    3030#include <rtems/score/userext.h>
    3131#include <rtems/score/wkspace.h>
     32#include <rtems/config.h>
    3233
    3334/*PAGE
     
    5960   * Do not allow mixture.
    6061   */
    61 
    62   if ( !( ( _CPU_Table.stack_allocate_hook == 0 )
    63        == ( _CPU_Table.stack_free_hook == 0 ) ) )
     62    if ( !( (!_Configuration_Table->stack_allocate_hook)
     63            == (!_Configuration_Table->stack_free_hook) ) )
    6464    _Internal_error_Occurred(
    6565      INTERNAL_ERROR_CORE,
  • cpukit/score/src/threadcreateidle.c

    r3e066540 r976162a6  
    3030#include <rtems/score/userext.h>
    3131#include <rtems/score/wkspace.h>
     32#include <rtems/config.h>
    3233
    3334/*PAGE
     
    6162#endif
    6263
    63   if ( _CPU_Table.idle_task )
    64     idle = _CPU_Table.idle_task;
     64  if ( _Configuration_Table->idle_task )
     65    idle = _Configuration_Table->idle_task;
    6566
    66   idle_task_stack_size =  _CPU_Table.idle_task_stack_size;
     67  idle_task_stack_size =  _Configuration_Table->idle_task_stack_size;
    6768  if ( idle_task_stack_size < STACK_MINIMUM_SIZE )
    6869    idle_task_stack_size = STACK_MINIMUM_SIZE;
  • cpukit/score/src/threadstackallocate.c

    r3e066540 r976162a6  
    3030#include <rtems/score/userext.h>
    3131#include <rtems/score/wkspace.h>
     32#include <rtems/config.h>
    3233
    3334/*PAGE
     
    5859   */
    5960
    60   if ( _CPU_Table.stack_allocate_hook ) {
    61     stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size );
     61  if ( _Configuration_Table->stack_allocate_hook ) {
     62    stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
    6263  } else {
    6364
  • cpukit/score/src/threadstackfree.c

    r3e066540 r976162a6  
    3030#include <rtems/score/userext.h>
    3131#include <rtems/score/wkspace.h>
     32#include <rtems/config.h>
    3233
    3334/*
     
    5455     */
    5556
    56     if ( _CPU_Table.stack_free_hook )
    57         (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area );
     57    if ( _Configuration_Table->stack_free_hook )
     58      (*_Configuration_Table->stack_free_hook)(
     59        the_thread->Start.Initial_stack.area
     60      );
    5861    else
    5962        _Workspace_Free( the_thread->Start.Initial_stack.area );
  • cpukit/score/src/wkspace.c

    r3e066540 r976162a6  
    22 *  Workspace Handler
    33 *
    4  *  XXX
    5  *
    6  *  NOTE:
    7  *
    8  *  COPYRIGHT (c) 1989-1999.
     4 *  COPYRIGHT (c) 1989-2007.
    95 *  On-Line Applications Research Corporation (OAR).
    106 *
     
    2319#include <rtems/score/wkspace.h>
    2420#include <rtems/score/interr.h>
     21#include <rtems/config.h>
     22
     23#include <string.h>  /* for memset */
    2524
    2625/*PAGE
     
    3433)
    3534{
    36   uint32_t   *zero_out_array;
    37   uint32_t    index;
    3835  uint32_t    memory_available;
    3936
     
    4542    );
    4643
    47   if ( _CPU_Table.do_zero_of_workspace ) {
    48     for( zero_out_array  = (uint32_t   *) starting_address, index = 0 ;
    49          index < size / sizeof( uint32_t   ) ;
    50          index++ )
    51       zero_out_array[ index ] = 0;
    52   }
     44  if ( _Configuration_Table->do_zero_of_workspace )
     45   memset( starting_address, 0, size );
    5346
    5447  memory_available = _Heap_Initialize(
Note: See TracChangeset for help on using the changeset viewer.