Changeset 442eac69 in rtems


Ignore:
Timestamp:
Sep 11, 2009, 3:35:52 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
f85ad076
Parents:
c0e7fb79
Message:

2009-09-11 Joel Sherrill <joel.sherrill@…>

  • score/include/rtems/score/thread.h, score/src/threadhandler.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Disable thread protocol and scheduling capabilities not exercised when POSIX or ITRON API is disabled.
Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rc0e7fb79 r442eac69  
     12009-09-11      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * score/include/rtems/score/thread.h, score/src/threadhandler.c,
     4        score/src/threadinitialize.c, score/src/threadtickletimeslice.c:
     5        Disable thread protocol and scheduling capabilities not exercised
     6        when POSIX or ITRON API is disabled.
     7
    182009-09-11      Joel Sherrill <joel.sherrill@OARcorp.com>
    29
  • cpukit/score/include/rtems/score/thread.h

    rc0e7fb79 r442eac69  
    77
    88/*
    9  *  COPYRIGHT (c) 1989-2008.
     9 *  COPYRIGHT (c) 1989-2009.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    2727 */
    2828/**@{*/
     29
     30#if defined(RTEMS_POSIX_API) || defined(RTEMS_ITRON_API)
     31  #define RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE
     32#endif
     33
     34#if defined(RTEMS_POSIX_API)
     35  #define RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT
     36#endif
     37
    2938
    3039#ifdef __cplusplus
     
    140149  THREAD_CPU_BUDGET_ALGORITHM_NONE,
    141150  THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE,
    142   THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
    143   THREAD_CPU_BUDGET_ALGORITHM_CALLOUT
     151  #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
     152    THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
     153  #endif
     154  #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
     155    THREAD_CPU_BUDGET_ALGORITHM_CALLOUT
     156  #endif
    144157}  Thread_CPU_budget_algorithms;
    145158
  • cpukit/score/src/threadhandler.c

    rc0e7fb79 r442eac69  
    150150        executing->Start.numeric_argument
    151151      );
    152   } else if ( executing->Start.prototype == THREAD_START_POINTER ) {
    153     executing->Wait.return_argument =
    154       (*(Thread_Entry_pointer) executing->Start.entry_point)(
    155         executing->Start.pointer_argument
    156       );
    157152  }
     153  #if defined(RTEMS_POSIX_API)
     154    else if ( executing->Start.prototype == THREAD_START_POINTER ) {
     155      executing->Wait.return_argument =
     156        (*(Thread_Entry_pointer) executing->Start.entry_point)(
     157          executing->Start.pointer_argument
     158        );
     159    }
     160  #endif
    158161  #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
    159162    else if ( executing->Start.prototype == THREAD_START_BOTH_POINTER_FIRST ) {
  • cpukit/score/src/threadinitialize.c

    rc0e7fb79 r442eac69  
    167167    case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
    168168      break;
    169     case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
    170       the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
    171       break;
    172     case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
    173       break;
     169    #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
     170      case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
     171        the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
     172        break;
     173    #endif
     174    #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
     175      case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
     176        break;
     177    #endif
    174178  }
    175179
  • cpukit/score/src/threadtickletimeslice.c

    rc0e7fb79 r442eac69  
    7777
    7878    case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
    79     case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
     79    #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
     80      case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
     81    #endif
    8082      if ( (int)(--executing->cpu_time_budget) <= 0 ) {
    8183        _Thread_Reset_timeslice();
     
    8486      break;
    8587
    86     case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
    87       if ( --executing->cpu_time_budget == 0 )
    88         (*executing->budget_callout)( executing );
    89       break;
     88    #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
     89      case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
     90        if ( --executing->cpu_time_budget == 0 )
     91          (*executing->budget_callout)( executing );
     92        break;
     93    #endif
    9094  }
    9195}
Note: See TracChangeset for help on using the changeset viewer.