Changeset fb1d8f81 in rtems for cpukit/score/inline


Ignore:
Timestamp:
Aug 30, 2001, 6:33:57 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
7078fa2a
Parents:
760045f0
Message:

2001-08-30 Joel Sherrill <joel@…>

  • src/coremutex.c, src/coremutexseize.c, src/coremutexsurrender.c, inline/rtems/score/coremutex.inl: The per thread field resource_count should only be manipulated when a mutex is priority ceiling or priority inherit. This was reported by Chris Johns <ccj@…> who also noticed that the use of switches for all disciplines generated less efficient code than using explicit tests for the one or two cases we were really interested in. Further review of his modifications made it apparent that the "isa" methods to test mutex discipline were not being used so this modification was swept into the code as well.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/inline/rtems/score/coremutex.inl

    r760045f0 rfb1d8f81  
    135135    the_mutex->holder_id  = executing->Object.id;
    136136    the_mutex->nest_count = 1;
    137     executing->resource_count++;
    138     if ( the_mutex->Attributes.discipline !=
    139            CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING ) {
     137    if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
     138         _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) )
     139      executing->resource_count++;
     140    if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
    140141        _ISR_Enable( level );
    141142        return 0;
Note: See TracChangeset for help on using the changeset viewer.