Changeset 0794197 in rtems


Ignore:
Timestamp:
Jan 27, 2017, 10:15:50 PM (3 years ago)
Author:
Kuan-Hsun Chen <c0066c@…>
Branches:
5, master
Children:
180107e9
Parents:
4ea92d1e
git-author:
Kuan-Hsun Chen <c0066c@…> (01/27/17 22:15:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/30/17 06:53:13)
Message:

rtems: Fix _Rate_monotonic_Renew_deadline()

Prepare a precondition to prevent the potential integer overflow.

Remove one redundant parameter in _Rate_monotonic_Renew_deadline().

sptests/sprmsched02: Create
A test case for checking the overflow condition of postponed_jobs
in rtems_rate_monotonic_period_status.

Update #2885.

Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/ratemontimeout.c

    r4ea92d1e r0794197  
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
    12  *  COPYRIGHT (c) 2016 Kuan-Hsun Chen.
     12 *  COPYRIGHT (c) 2016-2017 Kuan-Hsun Chen.
    1313 *
    1414 *  The license and distribution terms for this file may be
     
    2525static void _Rate_monotonic_Renew_deadline(
    2626  Rate_monotonic_Control *the_period,
    27   Thread_Control         *owner,
    2827  ISR_lock_Context       *lock_context
    2928)
     
    3130  uint64_t deadline;
    3231
    33   ++the_period->postponed_jobs;
     32  /* stay at 0xffffffff if postponed_jobs is going to overflow */
     33  if ( the_period->postponed_jobs != UINT32_MAX ) {
     34    ++the_period->postponed_jobs;
     35  }
     36
    3437  the_period->state = RATE_MONOTONIC_EXPIRED;
    3538
     
    8689    }
    8790  } else {
    88     _Rate_monotonic_Renew_deadline( the_period, owner, &lock_context );
     91    _Rate_monotonic_Renew_deadline( the_period, &lock_context );
    8992  }
    9093}
  • testsuites/sptests/Makefile.am

    r4ea92d1e r0794197  
    1111    sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
    1212    sp60      sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
    13     sp70 sp71 sp72 sp73 sp74 sp75 sp76 sp77 sp2038 \
     13    sp70 sp71 sp72 sp73 sp74 sp75 sp76 sp77 sprmsched02 sp2038 \
    1414    spassoc01 spchain spcoverage spobjgetnext \
    1515    spprintk spprivenv01 sprbtree01 spsize spstkalloc \
  • testsuites/sptests/configure.ac

    r4ea92d1e r0794197  
    145145sp76/Makefile
    146146sp77/Makefile
     147sprmsched02/Makefile
    147148sp2038/Makefile
    148149spassoc01/Makefile
Note: See TracChangeset for help on using the changeset viewer.