Changeset dee98ce in rtems


Ignore:
Timestamp:
Jan 5, 2009, 8:16:07 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
8b3416f
Parents:
b028e72
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

    rb028e72 rdee98ce  
     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-05      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • cpukit/sapi/include/confdefs.h

    rb028e72 rdee98ce  
    465465
    466466/**
     467 *  Do not use the unlimited bit as part of the multiplication
     468 *  for memory usage.
     469 */
     470#define _Configure_Max_Objects(_max) \
     471  ((_max) & ~RTEMS_UNLIMITED_OBJECTS)
     472
     473/**
    467474 *  This macro accounts for how memory for a set of configured objects is
    468475 *  allocated from the Executive Workspace. 
     
    472479 */
    473480#define _Configure_Object_RAM(_number, _size) \
    474   ( _Configure_From_workspace((_number) * (_size)) + \
     481  ( _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
    475482    _Configure_From_workspace( \
    476       (((_number) + 1) * sizeof(Objects_Control *)) + \
     483      ((_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *)) + \
    477484      (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) \
    478485    ) \
     
    14071414 ( \
    14081415  _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \
    1409   ((_tasks) * \
     1416  (_Configure_Max_Objects(_tasks) * \
    14101417   (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \
    14111418    _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API) + \
     
    14131420    CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
    14141421    CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API))  + \
    1415   _Configure_From_workspace((_number_FP_tasks) * CONTEXT_FP_SIZE) \
     1422  _Configure_From_workspace( \
     1423    _Configure_Max_Objects(_number_FP_tasks) * CONTEXT_FP_SIZE) \
    14161424 )
    14171425
     
    16471655
    16481656    /* Classic API Pieces */
     1657    uint32_t CLASSIC_TASKS;
    16491658    uint32_t TASK_VARIABLES;
    16501659    uint32_t TIMERS;
     
    17001709
    17011710    /* Classic API Pieces */
     1711    CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0),
    17021712    CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES),
    17031713    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
Note: See TracChangeset for help on using the changeset viewer.