Changeset 97bbf02 in rtems


Ignore:
Timestamp:
Mar 22, 2016, 7:52:50 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6f9c3e55
Parents:
1e1a91e
git-author:
Sebastian Huber <sebastian.huber@…> (03/22/16 07:52:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/29/16 05:26:43)
Message:

score: Use constant for maximum count of CORE sema

Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/monitor/mon-sema.c

    r1e1a91e r97bbf02  
    2929    if (_Attributes_Is_counting_semaphore(canonical_sema->attribute)) {
    3030      /* we have a counting semaphore */
    31       canonical_sema->cur_count  =
    32         rtems_sema->Core_control.semaphore.count;
    33 
    34       canonical_sema->max_count  =
    35         rtems_sema->Core_control.semaphore.Attributes.maximum_count;
     31      canonical_sema->cur_count  = rtems_sema->Core_control.semaphore.count;
     32      canonical_sema->max_count  = UINT32_MAX;
    3633    }
    3734    else {
  • cpukit/posix/src/semaphorecreatesupp.c

    r1e1a91e r97bbf02  
    9696    &the_semaphore->Semaphore,
    9797    CORE_SEMAPHORE_DISCIPLINES_FIFO,
    98     0xFFFFFFFF,
    9998    value
    10099  );
  • cpukit/rtems/src/semcreate.c

    r1e1a91e r97bbf02  
    154154      &the_semaphore->Core_control.semaphore,
    155155      semaphore_discipline,
    156       0xFFFFFFFF,
    157156      count
    158157    );
  • cpukit/score/include/rtems/score/coresem.h

    r1e1a91e r97bbf02  
    5151
    5252/**
    53  *  The following defines the control block used to manage the
    54  *  attributes of each semaphore.
    55  */
    56 typedef struct {
    57   /** This element indicates the maximum count this semaphore may have. */
    58   uint32_t                    maximum_count;
    59 }   CORE_semaphore_Attributes;
    60 
    61 /**
    6253 *  The following defines the control block used to manage each
    6354 *  counting semaphore.
     
    7465  const Thread_queue_Operations *operations;
    7566
    76   /** This element is the set of attributes which define this instance's
    77    *  behavior.
    78    */
    79   CORE_semaphore_Attributes   Attributes;
    8067  /** This element contains the current count of this semaphore. */
    8168  uint32_t                    count;
  • cpukit/score/include/rtems/score/coresemimpl.h

    r1e1a91e r97bbf02  
    8888 *  @param[in] the_semaphore is the semaphore to initialize
    8989 *  @param[in] discipline the blocking discipline
    90  *  @param[in] maximum_count the maximum count
    9190 *  @param[in] initial_value is the initial count of the semaphore
    9291 */
     
    9493  CORE_semaphore_Control     *the_semaphore,
    9594  CORE_semaphore_Disciplines  discipline,
    96   uint32_t                    maximum_count,
    9795  uint32_t                    initial_value
    9896);
     
    159157#endif
    160158  } else {
    161     if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
     159    if ( the_semaphore->count < UINT32_MAX )
    162160      the_semaphore->count += 1;
    163161    else
  • cpukit/score/src/coresem.c

    r1e1a91e r97bbf02  
    2424  CORE_semaphore_Control     *the_semaphore,
    2525  CORE_semaphore_Disciplines  discipline,
    26   uint32_t                    maximum_count,
    2726  uint32_t                    initial_value
    2827)
    2928{
    30 
    31   the_semaphore->Attributes.maximum_count = maximum_count;
    3229  the_semaphore->count = initial_value;
    3330
  • cpukit/score/src/mpci.c

    r1e1a91e r97bbf02  
    121121    &_MPCI_Semaphore,
    122122    CORE_SEMAPHORE_DISCIPLINES_FIFO,
    123     0xffffffff,
    124123    0                         /* initial_value */
    125124  );
Note: See TracChangeset for help on using the changeset viewer.