Changeset 32991495 in rtems for cpukit/include/rtems/confdefs.h


Ignore:
Timestamp:
Dec 9, 2019, 3:03:11 PM (8 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
6f3bc0e
Parents:
01d5944
git-author:
Sebastian Huber <sebastian.huber@…> (12/09/19 15:03:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/12/20 08:08:36)
Message:

score: Statically allocate idle/MPCI stacks

Place idle and MPCI stacks into extra linker sections. This can be
optionally used by applications to control the placement of the stacks.

Update #3835.

File:
1 edited

Legend:

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

    r01d5944 r32991495  
    18101810        CONFIGURE_MP_MPCI_TABLE_POINTER         /* ptr to MPCI config table */
    18111811      };
     1812
     1813      char _MPCI_Receive_server_stack[
     1814        CONFIGURE_MINIMUM_TASK_STACK_SIZE
     1815          + CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
     1816          + CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK
     1817          + CPU_ALL_TASKS_ARE_FP * CONTEXT_FP_SIZE
     1818      ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT )
     1819      RTEMS_SECTION( ".rtemsstack.mpci" );
    18121820    #endif
    18131821
     
    23802388/*
    23812389 * This macro is calculated to specify the memory required for
    2382  * the Idle tasks(s) stack.
    2383  */
    2384 #define _CONFIGURE_IDLE_TASKS_STACK \
    2385   (_CONFIGURE_IDLE_TASKS_COUNT * \
    2386     _Configure_From_stackspace( CONFIGURE_IDLE_TASK_STACK_SIZE ) )
    2387 
    2388 /*
    2389  * This macro is calculated to specify the stack memory required for the MPCI
    2390  * task.
    2391  */
    2392 #define _CONFIGURE_MPCI_RECEIVE_SERVER_STACK \
    2393   (_CONFIGURE_MPCI_RECEIVE_SERVER_COUNT * \
    2394     _Configure_From_stackspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE))
    2395 
    2396 /*
    2397  * This macro is calculated to specify the memory required for
    23982390 * the stacks of all tasks.
    23992391 */
     
    24122404#else /* CONFIGURE_EXECUTIVE_RAM_SIZE */
    24132405
    2414 #define _CONFIGURE_IDLE_TASKS_STACK 0
    2415 #define _CONFIGURE_MPCI_RECEIVE_SERVER_STACK 0
    24162406#define _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS 0
    24172407#define _CONFIGURE_TASKS_STACK 0
     
    24342424#define _CONFIGURE_STACK_SPACE_SIZE \
    24352425  ( \
    2436     _CONFIGURE_IDLE_TASKS_STACK + \
    2437     _CONFIGURE_MPCI_RECEIVE_SERVER_STACK + \
    24382426    _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS + \
    24392427    _CONFIGURE_TASKS_STACK + \
    24402428    _CONFIGURE_POSIX_THREADS_STACK + \
    2441     CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK + \
    24422429    _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS + \
    24432430    CONFIGURE_EXTRA_TASK_STACKS + \
     
    25642551  const uint32_t _Watchdog_Ticks_per_second = _CONFIGURE_TICKS_PER_SECOND;
    25652552
    2566   const size_t _Thread_Initial_thread_count = _CONFIGURE_IDLE_TASKS_COUNT +
    2567     _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT +
     2553  const size_t _Thread_Initial_thread_count =
    25682554    rtems_resource_maximum_per_allocation( _CONFIGURE_TASKS ) +
    25692555    rtems_resource_maximum_per_allocation( CONFIGURE_MAXIMUM_POSIX_THREADS );
     
    25752561    _CONFIGURE_IDLE_TASKS_COUNT + _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT
    25762562  );
     2563
     2564  char _Thread_Idle_stacks[
     2565    _CONFIGURE_IDLE_TASKS_COUNT
     2566      * ( CONFIGURE_IDLE_TASK_STACK_SIZE
     2567        + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE )
     2568  ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT )
     2569  RTEMS_SECTION( ".rtemsstack.idle" );
    25772570
    25782571  #if CONFIGURE_MAXIMUM_BARRIERS > 0
Note: See TracChangeset for help on using the changeset viewer.