Changeset 8b6a056 in rtems


Ignore:
Timestamp:
Jan 5, 2009, 8:15:51 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.9
Children:
b7a2654
Parents:
eb63fa52
Message:

2009-01-05 Joel Sherrill <joel.sherrill@…>

PR 1351/cpukit

  • sapi/include/confdefs.h: Mask off unlimited object bit before using configured number in calculations.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    reb63fa52 r8b6a056  
     12009-01-05      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        PR 1351/cpukit
     4        * sapi/include/confdefs.h: Mask off unlimited object bit before using
     5        configured number in calculations.
     6
    172009-01-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • cpukit/sapi/include/confdefs.h

    reb63fa52 r8b6a056  
    379379
    380380/**
     381 *  Do not use the unlimited bit as part of the multiplication
     382 *  for memory usage.
     383 */
     384#define _Configure_Max_Objects(_max) \
     385  ((_max) & ~RTEMS_UNLIMITED_OBJECTS)
     386
     387/**
    381388 *  This macro accounts for how memory for a set of configured objects is
    382389 *  allocated from the Executive Workspace. 
     
    386393 */
    387394#define _Configure_Object_RAM(_number, _size) \
    388   ( _Configure_From_workspace((_number) * (_size)) + \
     395  ( _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
    389396    _Configure_From_workspace( \
    390       (((_number) + 1) * sizeof(Objects_Control *)) + \
     397      ((_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *)) + \
    391398      (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) \
    392399    ) \
     
    13351342 ( \
    13361343  _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \
    1337   ((_tasks) * \
     1344  (_Configure_Max_Objects(_tasks) * \
    13381345   (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \
    13391346    _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API) + \
     
    13411348    CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
    13421349    CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API))  + \
    1343   _Configure_From_workspace((_number_FP_tasks) * CONTEXT_FP_SIZE) \
     1350  _Configure_From_workspace( \
     1351    _Configure_Max_Objects(_number_FP_tasks) * CONTEXT_FP_SIZE) \
    13441352 )
    13451353
     
    15751583
    15761584    /* Classic API Pieces */
     1585    uint32_t CLASSIC_TASKS;
    15771586    uint32_t TASK_VARIABLES;
    15781587    uint32_t TIMERS;
     
    16281637
    16291638    /* Classic API Pieces */
     1639    CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0),
    16301640    CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES),
    16311641    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
Note: See TracChangeset for help on using the changeset viewer.