Changeset 770db69 in rtems


Ignore:
Timestamp:
Aug 1, 2009, 9:49:40 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
70a66ca
Parents:
1d4005db
Message:

2009-08-01 Joel Sherrill <joel.sherrill@…>

  • posix/src/psxtransschedparam.c, posix/src/pthread.c: Add error checks for 0 time on sporadic scheduler replenish period and initial budget. This avoids having to correct for it in the TSR, so we can eliminate the check for ticks == 0 there.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r1d4005db r770db69  
     12009-08-01      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * posix/src/psxtransschedparam.c, posix/src/pthread.c: Add error checks
     4        for 0 time on sporadic scheduler replenish period and initial budget.
     5        This avoids having to correct for it in the TSR, so we can eliminate
     6        the check for ticks == 0 there.
     7
    182009-08-01      Joel Sherrill <joel.sherrill@OARcorp.com>
    29
  • cpukit/posix/src/psxtransschedparam.c

    r1d4005db r770db69  
    5050
    5151  if ( policy == SCHED_SPORADIC ) {
     52    if ( (param->ss_replenish_period.tv_sec == 0) &&
     53         (param->ss_replenish_period.tv_nsec == 0) )
     54      return EINVAL;
     55
     56    if ( (param->ss_initial_budget.tv_sec == 0) &&
     57         (param->ss_initial_budget.tv_nsec == 0) )
     58      return EINVAL;
     59
    5260    if ( _Timespec_To_ticks( &param->ss_replenish_period ) <
    5361         _Timespec_To_ticks( &param->ss_initial_budget ) )
  • cpukit/posix/src/pthread.c

    r1d4005db r770db69  
    7979  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    8080
     81  /* ticks is guaranteed to be at least one */
    8182  ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
    82 
    83   if ( !ticks )
    84     ticks = 1;
    8583
    8684  the_thread->cpu_time_budget = ticks;
     
    9391    _Thread_Change_priority( the_thread, new_priority, true );
    9492
     93  /* ticks is guaranteed to be at least one */
    9594  ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period );
    96 
    97   if ( !ticks )
    98     ticks = 1;
    9995
    10096  _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
Note: See TracChangeset for help on using the changeset viewer.