Changeset 3bacb250 in rtems for cpukit/posix/src/pthread.c


Ignore:
Timestamp:
Apr 3, 2010, 5:55:59 AM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 5, master
Children:
e24760ae
Parents:
394ac3c
Message:

Reflect POSIX sched_parm changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/pthread.c

    r394ac3c r3bacb250  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2010.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    4949  {                           /* schedparam */
    5050    2,                        /* sched_priority */
    51     0,                        /* ss_low_priority */
    52     { 0L, 0 },                /* ss_replenish_period */
    53     { 0L, 0 }                 /* ss_initial_budget */
     51    0,                        /* sched_ss_low_priority */
     52    { 0L, 0 },                /* sched_ss_repl_period */
     53    { 0L, 0 }                 /* sched_ss_init_budget */
    5454  },
    5555  PTHREAD_CREATE_JOINABLE,    /* detachstate */
     
    7575
    7676  /* ticks is guaranteed to be at least one */
    77   ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
     77  ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
    7878
    7979  the_thread->cpu_time_budget = ticks;
    8080
    81   new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
     81  new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
    8282  the_thread->real_priority = new_priority;
    8383
     
    102102
    103103  /* ticks is guaranteed to be at least one */
    104   ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period );
     104  ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
    105105
    106106  _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
     
    125125  the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
    126126
    127   new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority );
     127  new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
    128128  the_thread->real_priority = new_priority;
    129129
     
    138138    /*
    139139     *  Make sure we are actually lowering it. If they have lowered it
    140      *  to logically lower than ss_low_priority, then we do not want to
     140     *  to logically lower than sched_ss_low_priority, then we do not want to
    141141     *  change it.
    142142     */
Note: See TracChangeset for help on using the changeset viewer.