Changeset 3fba9de2 in rtems


Ignore:
Timestamp:
Dec 12, 2019, 7:50:40 AM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
78211376
Parents:
1d9f509e
git-author:
Sebastian Huber <sebastian.huber@…> (12/12/19 07:50:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/13/19 07:35:21)
Message:

config: Statically allocate MP object controls

Update #3735.

Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/confdefs.h

    r1d9f509e r3fba9de2  
    18241824      #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
    18251825    #endif
    1826     #define _CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
    1827       _Configure_From_workspace( \
    1828         (_global_objects) * sizeof(Objects_MP_Control) \
    1829       )
    18301826
    18311827    #ifndef CONFIGURE_MP_MAXIMUM_PROXIES
     
    18461842        #error "CONFIGURE_MP_NODE_NUMBER must be less than or equal to CONFIGURE_MP_MAXIMUM_NODES"
    18471843      #endif
     1844
     1845      Objects_MP_Control _Objects_MP_Controls[
     1846        CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
     1847      ];
    18481848
    18491849      struct Thread_Configured_proxy_control {
     
    23932393  (_Configure_Max_Objects(_number_FP_tasks) \
    23942394    * _Configure_From_workspace(CONTEXT_FP_SIZE))
    2395 
    2396 /*
    2397  * This defines the amount of memory configured for the multiprocessing
    2398  * support required by this application.
    2399  */
    2400 #ifdef CONFIGURE_MP_APPLICATION
    2401   #define _CONFIGURE_MEMORY_FOR_MP \
    2402      _CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS)
    2403 #else
    2404   #define _CONFIGURE_MEMORY_FOR_MP  0
    2405 #endif
    24062395
    24072396/**
     
    24832472     CONFIGURE_MAXIMUM_POSIX_SHMS) + \
    24842473   _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS + \
    2485    _CONFIGURE_MEMORY_FOR_MP + \
    24862474   CONFIGURE_MESSAGE_BUFFER_MEMORY + \
    24872475   (CONFIGURE_MEMORY_OVERHEAD * 1024) + \
  • cpukit/include/rtems/score/objectdata.h

    r1d9f509e r3fba9de2  
    144144  uint32_t name;
    145145} Objects_MP_Control;
     146
     147/**
     148 * @brief The MP object controls.
     149 *
     150 * Provided by the application via <rtems/confdefs.h>.
     151 */
     152extern Objects_MP_Control _Objects_MP_Controls[];
    146153
    147154/**
  • cpukit/score/src/mpcidefault.c

    r1d9f509e r3fba9de2  
    2020
    2121#include <rtems/score/mpci.h>
     22#include <rtems/score/objectdata.h>
    2223#include <rtems/score/stack.h>
    2324#include <rtems/score/thread.h>
     25
     26Objects_MP_Control _Objects_MP_Controls[ 0 ];
    2427
    2528Thread_Configured_proxy_control * const _Thread_MP_Proxies;
  • cpukit/score/src/objectmp.c

    r1d9f509e r3fba9de2  
    2222#include <rtems/score/interr.h>
    2323#include <rtems/score/isrlock.h>
    24 #include <rtems/score/wkspace.h>
    2524#include <rtems/config.h>
    2625
     
    186185  _Chain_Initialize(
    187186    &_Objects_MP_Inactive_global_objects,
    188     _Workspace_Allocate_or_fatal_error(
    189       maximum_global_objects * sizeof( Objects_MP_Control )
    190     ),
     187    &_Objects_MP_Controls[ 0 ],
    191188    maximum_global_objects,
    192     sizeof( Objects_MP_Control )
     189    sizeof( _Objects_MP_Controls[ 0 ] )
    193190  );
    194191}
Note: See TracChangeset for help on using the changeset viewer.