Changeset b4f635e in rtems for cpukit/sapi/include/confdefs.h


Ignore:
Timestamp:
11/10/11 14:40:13 (11 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
3aefd34
Parents:
742a2ba
Message:

2011-11-10 Sebastian Huber <sebastian.huber@…>

PR 1924/cpukit

  • sapi/include/rtems/config.h: New fields stack_space_size, unified_work_area, and stack_allocator_avoids_work_space in rtems_configuration_table.
  • sapi/include/confdefs.h: Removed rtems_unified_work_area (this is now part of the Configuration). Separate work space and stack space estimate. Added CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE configuration option.
  • libmisc/shell/main_wkspaceinfo.c, score/src/wkspace.c, libcsupport/src/malloc_initialize.c: Update due to API changes.
File:
1 edited

Legend:

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

    r742a2ba rb4f635e  
    765765#endif
    766766
     767#define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE \
     768  (2 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
     769
    767770/**
    768771 *  @brief Idle task stack size configuration
     
    777780    #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
    778781  #endif
     782#endif
     783#if CONFIGURE_IDLE_TASK_STACK_SIZE < CONFIGURE_MINIMUM_TASK_STACK_SIZE
     784  #error "CONFIGURE_IDLE_TASK_STACK_SIZE less than CONFIGURE_MINIMUM_TASK_STACK_SIZE"
    779785#endif
    780786
     
    856862    #include <rtems/score/wkspace.h>
    857863    Heap_Control  *RTEMS_Malloc_Heap = &_Workspace_Area;
    858     bool           rtems_unified_work_area = true;
    859864  #else
    860865    Heap_Control   RTEMS_Malloc_Area;
    861866    Heap_Control  *RTEMS_Malloc_Heap = &RTEMS_Malloc_Area;
    862     bool           rtems_unified_work_area = false;
    863867  #endif
    864868#endif
     
    12421246#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
    12431247
     1248#ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
     1249  #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
     1250#endif
     1251
    12441252#if defined(RTEMS_MULTIPROCESSING)
    12451253  /*
     
    12731281      #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
    12741282        _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) )
    1275 
    1276       #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
    1277         #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
    1278       #endif
    12791283
    12801284      #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
     
    15221526  #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
    15231527    _Configure_From_workspace( \
    1524       CONFIGURE_MINIMUM_TASK_STACK_SIZE + \
    15251528      sizeof (POSIX_API_Control) + \
    15261529     (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
     
    16401643      #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
    16411644        #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
    1642                 (CONFIGURE_MINIMUM_TASK_STACK_SIZE * 2)
     1645          CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
    16431646      #endif
    16441647
     
    16861689      CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \
    16871690          CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \
    1688       CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \
    1689       (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
     1691      CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) \
    16901692     )
    16911693#else
     
    17291731  #endif
    17301732
    1731   /**
    1732    * Ada tasks are allocated twice the minimum stack space.
    1733    */
    1734   #define CONFIGURE_ADA_TASKS_STACK \
    1735     (CONFIGURE_MAXIMUM_ADA_TASKS * \
    1736       (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (6 * 1024)))
    1737 
    17381733#else
    17391734  #define CONFIGURE_GNAT_MUTEXES           0
    17401735  #define CONFIGURE_MAXIMUM_ADA_TASKS      0
    17411736  #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
    1742   #define CONFIGURE_ADA_TASKS_STACK        0
    17431737#endif
    17441738
     
    17961790#endif
    17971791
     1792/**
     1793 *  This is so we can account for tasks with stacks greater than minimum
     1794 *  size.  This is in bytes.
     1795 */
     1796#ifndef CONFIGURE_EXTRA_TASK_STACKS
     1797  #define CONFIGURE_EXTRA_TASK_STACKS 0
     1798#endif
    17981799
    17991800/*
     
    18141815  _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \
    18151816  (_Configure_Max_Objects(_tasks) * \
    1816    (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \
    1817     CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API + \
     1817    (CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API + \
    18181818    CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB + \
    18191819    CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
     
    18341834     CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS( \
    18351835             CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
    1836      CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \
    1837      CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \
     1836     CONFIGURE_MEMORY_FOR_TASKS(1, 1) \
    18381837  )
    18391838#else
    18401839  #define CONFIGURE_MEMORY_FOR_MP  0
    1841 #endif
    1842 
    1843 /**
    1844  *  This is so we can account for tasks with stacks greater than minimum
    1845  *  size.  This is in bytes.
    1846  */
    1847 #ifndef CONFIGURE_EXTRA_TASK_STACKS
    1848   #define CONFIGURE_EXTRA_TASK_STACKS 0
    18491840#endif
    18501841
     
    19161907
    19171908/**
    1918  *  This defines the formula used to compute the amount of memory
    1919  *  reserved for IDLE task control structures and stacks.
    1920  */
    1921 #define CONFIGURE_IDLE_TASKS(_count) \
    1922     (CONFIGURE_MEMORY_FOR_TASKS(_count, 0) + \
    1923       _count * _Configure_From_workspace( \
    1924        (CONFIGURE_IDLE_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)))
    1925 
    1926 /**
    19271909 *  This calculates the amount of memory reserved for the IDLE tasks.
    19281910 *  In an SMP system, each CPU core has its own idle task.
    19291911 */
    19301912#if defined(RTEMS_SMP)
    1931   #define CONFIGURE_MEMORY_FOR_IDLE_TASK \
    1932           CONFIGURE_IDLE_TASKS(CONFIGURE_SMP_MAXIMUM_PROCESSORS)
     1913  #define CONFIGURE_IDLE_TASKS_COUNT CONFIGURE_SMP_MAXIMUM_PROCESSORS
    19331914#else
    1934   #define CONFIGURE_MEMORY_FOR_IDLE_TASK \
    1935           CONFIGURE_IDLE_TASKS(1)
    1936 #endif
     1915  #define CONFIGURE_IDLE_TASKS_COUNT 1
     1916#endif
     1917
     1918/**
     1919 *  This defines the formula used to compute the amount of memory
     1920 *  reserved for IDLE task control structures.
     1921 */
     1922#define CONFIGURE_MEMORY_FOR_IDLE_TASK \
     1923  CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_IDLE_TASKS_COUNT, 0)
    19371924
    19381925/**
     
    19461933    CONFIGURE_API_MUTEX_MEMORY                     /* allocation mutex */ \
    19471934  )
    1948 
    1949 /*
    1950  *  Now account for any extra memory that initialization tasks or threads
    1951  *  may have requested.
    1952  */
    1953 
    1954 /**
    1955  *  This accounts for any extra memory required by the Classic API
    1956  *  Initialization Task.
    1957  */
    1958 #if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
    1959   #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \
    1960       (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
    1961 #else
    1962   #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0
    1963 #endif
    1964 
    1965 /**
    1966  *  This accounts for any extra memory required by the POSIX API
    1967  *  Initialization Thread.
    1968  */
    1969 #if defined(RTEMS_POSIX_API) && \
    1970     (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
    1971   #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
    1972     (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
    1973 #else
    1974   #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
    1975 #endif
    1976 
    1977 /**
    1978  *  This macro provides a summation of the various initialization task
    1979  *  and thread stack requirements.
    1980  */
    1981 #define CONFIGURE_INITIALIZATION_THREADS_STACKS \
    1982     (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \
    1983     CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART)
    19841935
    19851936/**
     
    20311982#endif
    20321983
    2033 #if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT)
    2034   /**
    2035    *  This is a debug mechanism, so if you need to, the executable will
    2036    *  have a structure with various partial values.  Add to this as you
    2037    *  need to.  Viewing this structure in gdb combined with dumping
    2038    *  the Configuration structures generated should help a lot in tracing
    2039    *  down errors and analyzing where over and under allocations are.
    2040    */
    2041   typedef struct {
    2042     uint32_t SYSTEM_OVERHEAD;
    2043     uint32_t STATIC_EXTENSIONS;
    2044     uint32_t INITIALIZATION_THREADS_STACKS;
    2045 
    2046     uint32_t PER_INTEGER_TASK;
    2047     uint32_t FP_OVERHEAD;
    2048     uint32_t CLASSIC;
    2049     uint32_t POSIX;
    2050 
    2051     /* System overhead pieces */
    2052     uint32_t INTERRUPT_VECTOR_TABLE;
    2053     uint32_t INTERRUPT_STACK_MEMORY;
    2054     uint32_t MEMORY_FOR_IDLE_TASK;
    2055     uint32_t MEMORY_FOR_SCHEDULER;
    2056     uint32_t MEMORY_PER_TASK_FOR_SCHEDULER;
    2057 
    2058     /* Classic API Pieces */
    2059     uint32_t CLASSIC_TASKS;
    2060     uint32_t TASK_VARIABLES;
    2061     uint32_t TIMERS;
    2062     uint32_t SEMAPHORES;
    2063     uint32_t MESSAGE_QUEUES;
    2064     uint32_t PARTITIONS;
    2065     uint32_t REGIONS;
    2066     uint32_t PORTS;
    2067     uint32_t PERIODS;
    2068     uint32_t BARRIERS;
    2069     uint32_t USER_EXTENSIONS;
    2070 #ifdef RTEMS_POSIX_API
    2071     /* POSIX API Pieces */
    2072     uint32_t POSIX_MUTEXES;
    2073     uint32_t POSIX_CONDITION_VARIABLES;
    2074     uint32_t POSIX_KEYS;
    2075     uint32_t POSIX_TIMERS;
    2076     uint32_t POSIX_QUEUED_SIGNALS;
    2077     uint32_t POSIX_MESSAGE_QUEUES;
    2078     uint32_t POSIX_SEMAPHORES;
    2079     uint32_t POSIX_BARRIERS;
    2080     uint32_t POSIX_SPINLOCKS;
    2081     uint32_t POSIX_RWLOCKS;
    2082 #endif
    2083   } Configuration_Debug_t;
    2084 
    2085   Configuration_Debug_t Configuration_Memory_Debug = {
    2086     /* General Information */
    2087     CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD,
    2088     CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS,
    2089     CONFIGURE_INITIALIZATION_THREADS_STACKS,
    2090     CONFIGURE_MEMORY_FOR_TASKS(1, 0),
    2091     CONFIGURE_MEMORY_FOR_TASKS(0, 1),
    2092     CONFIGURE_MEMORY_FOR_CLASSIC,
    2093     CONFIGURE_MEMORY_FOR_POSIX,
    2094 
    2095     /* System overhead pieces */
    2096     CONFIGURE_INTERRUPT_VECTOR_TABLE,
    2097     CONFIGURE_INTERRUPT_STACK_MEMORY,
    2098     CONFIGURE_MEMORY_FOR_IDLE_TASK,
    2099     CONFIGURE_MEMORY_FOR_SCHEDULER,
    2100     CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER,
    2101 
    2102     /* Classic API Pieces */
    2103     CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0),
    2104     CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES +
    2105       CONFIGURE_GOROUTINES_TASK_VARIABLES),
    2106     CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
    2107     CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES),
    2108     CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES),
    2109     CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS),
    2110     CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
    2111     CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS),
    2112     CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS),
    2113     CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS),
    2114     CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS),
    2115 
    2116 #ifdef RTEMS_POSIX_API
    2117     /* POSIX API Pieces */
    2118     CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES +
    2119       CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_MUTEXES),
    2120     CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
    2121       CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
    2122       CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_CONDITION_VARIABLES),
    2123     CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ),
    2124     CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
    2125       CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
    2126     CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
    2127       CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ),
    2128     CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
    2129     CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ),
    2130     CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ),
    2131     CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( CONFIGURE_MAXIMUM_POSIX_RWLOCKS ),
    2132     CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
    2133 #endif
    2134   };
    2135 #endif
    2136 
    21371984/**
    21381985 *  This calculates the memory required for the executive workspace.
     
    21461993   CONFIGURE_MEMORY_FOR_CLASSIC + \
    21471994   CONFIGURE_MEMORY_FOR_POSIX + \
    2148    (CONFIGURE_MAXIMUM_POSIX_THREADS * CONFIGURE_MINIMUM_TASK_STACK_SIZE ) + \
    2149    (CONFIGURE_MAXIMUM_GOROUTINES * CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \
    2150    CONFIGURE_INITIALIZATION_THREADS_STACKS + \
    21511995   CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \
    21521996   CONFIGURE_MEMORY_FOR_MP + \
    21531997   CONFIGURE_MEMORY_FOR_SMP + \
    21541998   CONFIGURE_MESSAGE_BUFFER_MEMORY + \
    2155    (CONFIGURE_MEMORY_OVERHEAD * 1024) + \
    2156    (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
     1999   (CONFIGURE_MEMORY_OVERHEAD * 1024) \
    21572000) & ~0x7)
    2158 #endif
     2001
     2002/*
     2003 *  Now account for any extra memory that initialization tasks or threads
     2004 *  may have requested.
     2005 */
     2006
     2007/**
     2008 *  This accounts for any extra memory required by the Classic API
     2009 *  Initialization Task.
     2010 */
     2011#if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
     2012  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \
     2013      (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
     2014#else
     2015  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0
     2016#endif
     2017
     2018/**
     2019 *  This accounts for any extra memory required by the POSIX API
     2020 *  Initialization Thread.
     2021 */
     2022#if defined(RTEMS_POSIX_API) && \
     2023    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > \
     2024      CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE)
     2025  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
     2026    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - \
     2027      CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE)
     2028#else
     2029  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
     2030#endif
     2031
     2032/**
     2033 *  This macro provides a summation of the various initialization task
     2034 *  and thread stack requirements.
     2035 */
     2036#define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS \
     2037    (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \
     2038    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART)
     2039
     2040#define CONFIGURE_IDLE_TASKS_STACK \
     2041  (CONFIGURE_IDLE_TASKS_COUNT * \
     2042    _Configure_From_workspace( CONFIGURE_IDLE_TASK_STACK_SIZE ) )
     2043
     2044#define CONFIGURE_TASKS_STACK \
     2045  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_TASKS ) * \
     2046    _Configure_From_workspace( CONFIGURE_MINIMUM_TASK_STACK_SIZE ) )
     2047
     2048#define CONFIGURE_POSIX_THREADS_STACK \
     2049  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_POSIX_THREADS ) * \
     2050    _Configure_From_workspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
     2051
     2052#define CONFIGURE_GOROUTINES_STACK \
     2053  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_GOROUTINES ) * \
     2054    _Configure_From_workspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
     2055
     2056#define CONFIGURE_ADA_TASKS_STACK \
     2057  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_ADA_TASKS ) * \
     2058    _Configure_From_workspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
     2059
     2060#else /* CONFIGURE_EXECUTIVE_RAM_SIZE */
     2061
     2062#define CONFIGURE_IDLE_TASKS_STACK 0
     2063#define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS 0
     2064#define CONFIGURE_TASKS_STACK 0
     2065#define CONFIGURE_POSIX_THREADS_STACK 0
     2066#define CONFIGURE_GOROUTINES_STACK 0
     2067#define CONFIGURE_ADA_TASKS_STACK 0
     2068
     2069#if CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK != 0
     2070  #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK"
     2071#endif
     2072
     2073#if CONFIGURE_EXTRA_TASK_STACKS != 0
     2074  #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_TASK_STACKS"
     2075#endif
     2076
     2077#endif /* CONFIGURE_EXECUTIVE_RAM_SIZE */
     2078
     2079#define CONFIGURE_STACK_SPACE_SIZE \
     2080  ( \
     2081    CONFIGURE_IDLE_TASKS_STACK + \
     2082    CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS + \
     2083    CONFIGURE_TASKS_STACK + \
     2084    CONFIGURE_POSIX_THREADS_STACK + \
     2085    CONFIGURE_GOROUTINES_STACK + \
     2086    CONFIGURE_ADA_TASKS_STACK + \
     2087    CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK + \
     2088    CONFIGURE_EXTRA_TASK_STACKS \
     2089  )
    21592090
    21602091#ifdef CONFIGURE_INIT
     
    22312162    NULL,                                     /* filled in by BSP */
    22322163    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
     2164    CONFIGURE_STACK_SPACE_SIZE,               /* required stack space */
    22332165    CONFIGURE_MAXIMUM_USER_EXTENSIONS,        /* maximum dynamic extensions */
    22342166    CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
     
    22402172    CONFIGURE_TASK_STACK_DEALLOCATOR,         /* stack deallocator */
    22412173    CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY,   /* true to clear memory */
     2174    #ifdef CONFIGURE_UNIFIED_WORK_AREAS       /* true for unified work areas */
     2175      true,
     2176    #else
     2177      false,
     2178    #endif
     2179    #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE /* true to avoid
     2180                                                 work space for thread stack
     2181                                                 allocation */
     2182      true,
     2183    #else
     2184      false,
     2185    #endif
    22422186    CONFIGURE_MAXIMUM_DRIVERS,                /* maximum device drivers */
    22432187    CONFIGURE_NUMBER_OF_DRIVERS,              /* static device drivers */
     
    23182262 ******************************************************************
    23192263 */
     2264
     2265#if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT)
     2266  /**
     2267   *  This is a debug mechanism, so if you need to, the executable will
     2268   *  have a structure with various partial values.  Add to this as you
     2269   *  need to.  Viewing this structure in gdb combined with dumping
     2270   *  the Configuration structures generated should help a lot in tracing
     2271   *  down errors and analyzing where over and under allocations are.
     2272   */
     2273  typedef struct {
     2274    uint32_t SYSTEM_OVERHEAD;
     2275    uint32_t STATIC_EXTENSIONS;
     2276    uint32_t INITIALIZATION_THREADS_STACKS;
     2277
     2278    uint32_t PER_INTEGER_TASK;
     2279    uint32_t FP_OVERHEAD;
     2280    uint32_t CLASSIC;
     2281    uint32_t POSIX;
     2282
     2283    /* System overhead pieces */
     2284    uint32_t INTERRUPT_VECTOR_TABLE;
     2285    uint32_t INTERRUPT_STACK_MEMORY;
     2286    uint32_t MEMORY_FOR_IDLE_TASK;
     2287    uint32_t MEMORY_FOR_SCHEDULER;
     2288    uint32_t MEMORY_PER_TASK_FOR_SCHEDULER;
     2289
     2290    /* Classic API Pieces */
     2291    uint32_t CLASSIC_TASKS;
     2292    uint32_t TASK_VARIABLES;
     2293    uint32_t TIMERS;
     2294    uint32_t SEMAPHORES;
     2295    uint32_t MESSAGE_QUEUES;
     2296    uint32_t PARTITIONS;
     2297    uint32_t REGIONS;
     2298    uint32_t PORTS;
     2299    uint32_t PERIODS;
     2300    uint32_t BARRIERS;
     2301    uint32_t USER_EXTENSIONS;
     2302
     2303#ifdef RTEMS_POSIX_API
     2304    /* POSIX API Pieces */
     2305    uint32_t POSIX_MUTEXES;
     2306    uint32_t POSIX_CONDITION_VARIABLES;
     2307    uint32_t POSIX_KEYS;
     2308    uint32_t POSIX_TIMERS;
     2309    uint32_t POSIX_QUEUED_SIGNALS;
     2310    uint32_t POSIX_MESSAGE_QUEUES;
     2311    uint32_t POSIX_SEMAPHORES;
     2312    uint32_t POSIX_BARRIERS;
     2313    uint32_t POSIX_SPINLOCKS;
     2314    uint32_t POSIX_RWLOCKS;
     2315#endif
     2316
     2317    /* Stack space sizes */
     2318    uint32_t IDLE_TASKS_STACK;
     2319    uint32_t INITIALIZATION_THREADS_EXTRA_STACKS;
     2320    uint32_t TASKS_STACK;
     2321    uint32_t POSIX_THREADS_STACK;
     2322    uint32_t GOROUTINES_STACK;
     2323    uint32_t ADA_TASKS_STACK;
     2324    uint32_t EXTRA_MPCI_RECEIVE_SERVER_STACK;
     2325    uint32_t EXTRA_TASK_STACKS;
     2326  } Configuration_Debug_t;
     2327
     2328  Configuration_Debug_t Configuration_Memory_Debug = {
     2329    /* General Information */
     2330    CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD,
     2331    CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS,
     2332    CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS,
     2333    CONFIGURE_MEMORY_FOR_TASKS(1, 0),
     2334    CONFIGURE_MEMORY_FOR_TASKS(0, 1),
     2335    CONFIGURE_MEMORY_FOR_CLASSIC,
     2336    CONFIGURE_MEMORY_FOR_POSIX,
     2337
     2338    /* System overhead pieces */
     2339    CONFIGURE_INTERRUPT_VECTOR_TABLE,
     2340    CONFIGURE_INTERRUPT_STACK_MEMORY,
     2341    CONFIGURE_MEMORY_FOR_IDLE_TASK,
     2342    CONFIGURE_MEMORY_FOR_SCHEDULER,
     2343    CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER,
     2344
     2345    /* Classic API Pieces */
     2346    CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0),
     2347    CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES +
     2348      CONFIGURE_GOROUTINES_TASK_VARIABLES),
     2349    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
     2350    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES),
     2351    CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES),
     2352    CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS),
     2353    CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
     2354    CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS),
     2355    CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS),
     2356    CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS),
     2357    CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS),
     2358
     2359#ifdef RTEMS_POSIX_API
     2360    /* POSIX API Pieces */
     2361    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES +
     2362      CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_MUTEXES),
     2363    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
     2364      CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
     2365      CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_CONDITION_VARIABLES),
     2366    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ),
     2367    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
     2368      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
     2369    CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
     2370      CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ),
     2371    CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
     2372    CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ),
     2373    CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ),
     2374    CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( CONFIGURE_MAXIMUM_POSIX_RWLOCKS ),
     2375    CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
     2376#endif
     2377
     2378    /* Stack space sizes */
     2379    CONFIGURE_IDLE_TASKS_STACK,
     2380    CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS,
     2381    CONFIGURE_TASKS_STACK,
     2382    CONFIGURE_POSIX_THREADS_STACK,
     2383    CONFIGURE_GOROUTINES_STACK,
     2384    CONFIGURE_ADA_TASKS_STACK,
     2385    CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK,
     2386    CONFIGURE_EXTRA_TASK_STACKS
     2387  };
     2388#endif
    23202389
    23212390/*
Note: See TracChangeset for help on using the changeset viewer.