Changeset 45494d9c in rtems


Ignore:
Timestamp:
Apr 11, 2012, 1:28:41 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Children:
d189646
Parents:
0c9173d (diff), 5eb434e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'upstream'

Location:
cpukit
Files:
4 edited

Legend:

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

    r0c9173d r45494d9c  
    955955 */
    956956#define _Configure_Max_Objects(_max) \
    957   ((_max) & ~RTEMS_UNLIMITED_OBJECTS)
     957  rtems_resource_maximum_per_allocation(_max)
    958958
    959959/**
  • cpukit/sapi/include/rtems/config.h

    r0c9173d r45494d9c  
    3737#define rtems_resource_unlimited(resource) \
    3838  ( resource | RTEMS_UNLIMITED_OBJECTS )
     39
     40#define rtems_resource_is_unlimited(resource) \
     41  _Objects_Is_unlimited(resource)
     42
     43#define rtems_resource_maximum_per_allocation(resource) \
     44  _Objects_Maximum_per_allocation(resource)
    3945
    4046/*
  • cpukit/score/inline/rtems/score/object.inl

    r0c9173d r45494d9c  
    353353}
    354354
     355/**
     356 *  Returns if the object maximum specifies unlimited objects.
     357 *
     358 *  @param[in] maximum The object maximum specification.
     359 *
     360 *  @retval true Unlimited objects are available.
     361 *  @retval false The object count is fixed.
     362 */
     363RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited( uint32_t maximum )
     364{
     365  return (maximum & OBJECTS_UNLIMITED_OBJECTS) != 0;
     366}
     367
     368/*
     369 * We cannot use an inline function for this since it may be evaluated at
     370 * compile time.
     371 */
     372#define _Objects_Maximum_per_allocation( maximum ) \
     373  ((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS))
     374
    355375#endif
    356376/* end of include file */
  • cpukit/score/src/objectinitializeinformation.c

    r0c9173d r45494d9c  
    6363  static Objects_Control *null_local_table = NULL;
    6464  uint32_t                minimum_index;
    65   uint32_t                maximum_per_allocation;
     65  Objects_Maximum         maximum_per_allocation;
    6666  #if defined(RTEMS_MULTIPROCESSING)
    6767    uint32_t              index;
     
    9393   *  Are we operating in limited or unlimited (e.g. auto-extend) mode.
    9494   */
    95   information->auto_extend =
    96         (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
    97   maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
     95  information->auto_extend = _Objects_Is_unlimited( maximum );
     96  maximum_per_allocation = _Objects_Maximum_per_allocation( maximum );
    9897
    9998  /*
Note: See TracChangeset for help on using the changeset viewer.