Changeset 54f35888 in rtems for cpukit


Ignore:
Timestamp:
Oct 25, 2018, 8:54:12 AM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ef16a11
Parents:
033f31c8
git-author:
Sebastian Huber <sebastian.huber@…> (10/25/18 08:54:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/29/18 09:52:45)
Message:

posix: Provide threads by default

Update #2514.

Location:
cpukit
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    r033f31c8 r54f35888  
    471471librtemscpu_a_SOURCES += libstdthreads/cnd.c
    472472librtemscpu_a_SOURCES += libstdthreads/mtx.c
     473librtemscpu_a_SOURCES += libstdthreads/thrd.c
    473474librtemscpu_a_SOURCES += libstdthreads/tss.c
    474475librtemscpu_a_SOURCES += posix/src/adjtime.c
     
    597598librtemscpu_a_SOURCES += posix/src/pthreadattrsetstack.c
    598599librtemscpu_a_SOURCES += posix/src/pthreadattrsetstacksize.c
     600librtemscpu_a_SOURCES += posix/src/pthread.c
    599601librtemscpu_a_SOURCES += posix/src/pthreadconcurrency.c
    600602librtemscpu_a_SOURCES += posix/src/pthreadconfig.c
     603librtemscpu_a_SOURCES += posix/src/pthreadcreate.c
    601604librtemscpu_a_SOURCES += posix/src/pthreaddetach.c
    602605librtemscpu_a_SOURCES += posix/src/pthreadequal.c
     
    607610librtemscpu_a_SOURCES += posix/src/pthreadgetnamenp.c
    608611librtemscpu_a_SOURCES += posix/src/pthreadgetschedparam.c
     612librtemscpu_a_SOURCES += posix/src/pthreadinitthreads.c
     613librtemscpu_a_SOURCES += posix/src/pthreadjoin.c
    609614librtemscpu_a_SOURCES += posix/src/pthreadonce.c
    610615librtemscpu_a_SOURCES += posix/src/pthreadself.c
    611616librtemscpu_a_SOURCES += posix/src/pthreadsetaffinitynp.c
    612617librtemscpu_a_SOURCES += posix/src/pthreadsetnamenp.c
     618librtemscpu_a_SOURCES += posix/src/pthreadsetschedparam.c
     619librtemscpu_a_SOURCES += posix/src/pthreadsetschedprio.c
    613620librtemscpu_a_SOURCES += posix/src/rwlockattrdestroy.c
    614621librtemscpu_a_SOURCES += posix/src/rwlockattrgetpshared.c
     
    10481055if HAS_PTHREADS
    10491056
    1050 librtemscpu_a_SOURCES += libstdthreads/thrd.c
    10511057librtemscpu_a_SOURCES += posix/src/aio_cancel.c
    10521058librtemscpu_a_SOURCES += posix/src/aio_error.c
     
    10711077librtemscpu_a_SOURCES += posix/src/psxtimercreate.c
    10721078librtemscpu_a_SOURCES += posix/src/psxtimerdelete.c
    1073 librtemscpu_a_SOURCES += posix/src/pthread.c
    1074 librtemscpu_a_SOURCES += posix/src/pthreadcreate.c
    1075 librtemscpu_a_SOURCES += posix/src/pthreadinitthreads.c
    1076 librtemscpu_a_SOURCES += posix/src/pthreadjoin.c
    10771079librtemscpu_a_SOURCES += posix/src/pthreadkill.c
    1078 librtemscpu_a_SOURCES += posix/src/pthreadsetschedparam.c
    1079 librtemscpu_a_SOURCES += posix/src/pthreadsetschedprio.c
    10801080librtemscpu_a_SOURCES += posix/src/pthreadsigmask.c
    10811081librtemscpu_a_SOURCES += posix/src/ptimer.c
  • cpukit/include/rtems/confdefs.h

    r033f31c8 r54f35888  
    3535#include <rtems/posix/key.h>
    3636#include <rtems/posix/mqueue.h>
     37#include <rtems/posix/pthread.h>
    3738#include <rtems/posix/semaphore.h>
    3839#include <rtems/posix/shm.h>
     
    19511952      rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    19521953  #endif
     1954  #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS)
     1955    #define CONFIGURE_MAXIMUM_POSIX_THREADS \
     1956      rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     1957  #endif
    19531958
    19541959  #ifdef RTEMS_POSIX_API
    1955     #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS)
    1956       #define CONFIGURE_MAXIMUM_POSIX_THREADS \
    1957         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    1958     #endif
    19591960    #if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS)
    19601961      #define CONFIGURE_MAXIMUM_POSIX_TIMERS \
     
    23012302        * sizeof(POSIX_Keys_Key_value_pair)))
    23022303
     2304/**
     2305 * This configuration parameter specifies the maximum number of
     2306 * POSIX API threads.
     2307 */
     2308#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
     2309  #define CONFIGURE_MAXIMUM_POSIX_THREADS 0
     2310#endif
     2311
    23032312/*
    23042313 * Account for the object control structures plus the name
     
    23642373  #include <signal.h>
    23652374  #include <rtems/posix/psignal.h>
    2366   #include <rtems/posix/pthread.h>
    23672375  #include <rtems/posix/threadsup.h>
    23682376  #include <rtems/posix/timer.h>
    2369 
    2370   /**
    2371    * This configuration parameter specifies the maximum number of
    2372    * POSIX API threads.
    2373    */
    2374   #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
    2375     #define CONFIGURE_MAXIMUM_POSIX_THREADS 0
    2376   #endif
    23772377
    23782378  /**
     
    24062406    _Configure_From_workspace( \
    24072407      (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
    2408 
    2409   #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
    2410     #ifndef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
    2411       #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
    2412         #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init
    2413       #endif
    2414 
    2415       #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
    2416         #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
    2417           CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
    2418       #endif
    2419 
    2420       #ifdef CONFIGURE_INIT
    2421         posix_initialization_threads_table POSIX_Initialization_threads[] = {
    2422           { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT,
    2423             CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
    2424         };
    2425       #endif
    2426 
    2427       #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \
    2428         POSIX_Initialization_threads
    2429 
    2430       #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
    2431         RTEMS_ARRAY_SIZE(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME)
    2432     #endif /* !CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
    2433   #else /* !CONFIGURE_POSIX_INIT_THREAD_TABLE */
    2434     #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
    2435     #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
    2436   #endif /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
    2437 #else
    2438   /**
    2439    * This configuration parameter specifies the maximum number of
    2440    * POSIX API threads.
    2441    */
    2442   #define CONFIGURE_MAXIMUM_POSIX_THREADS         0
    24432408#endif /* RTEMS_POSIX_API */
     2409
     2410#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
     2411  #ifndef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
     2412    #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
     2413      #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init
     2414    #endif
     2415
     2416    #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
     2417      #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
     2418        CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
     2419    #endif
     2420
     2421    #ifdef CONFIGURE_INIT
     2422      posix_initialization_threads_table POSIX_Initialization_threads[] = {
     2423        { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT,
     2424          CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
     2425      };
     2426    #endif
     2427
     2428    #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \
     2429      POSIX_Initialization_threads
     2430
     2431    #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
     2432      RTEMS_ARRAY_SIZE(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME)
     2433  #endif /* !CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
     2434#else /* !CONFIGURE_POSIX_INIT_THREAD_TABLE */
     2435  #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
     2436  #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
     2437#endif /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
    24442438
    24452439/**
     
    27372731 * Initialization Thread.
    27382732 */
    2739 #if defined(RTEMS_POSIX_API) && \
    2740     (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > \
     2733#if (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > \
    27412734      CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE)
    27422735  #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
     
    30002993        CONFIGURE_MAXIMUM_POSIX_TIMERS;
    30012994    #endif
    3002 
    3003     posix_initialization_threads_table * const
    3004       _Configuration_POSIX_Initialization_threads =
    3005         CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME;
    3006 
    3007     const size_t _Configuration_POSIX_Initialization_thread_count =
    3008       CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE;
    30092995  #endif
    30102996
     
    30993085 *  then we need to install the code that runs that loop.
    31003086 */
    3101 #ifdef RTEMS_POSIX_API
    3102   #ifdef CONFIGURE_INIT
    3103     #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \
    3104         defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE)
    3105       RTEMS_SYSINIT_ITEM(
    3106         _POSIX_Threads_Initialize_user_threads_body,
    3107         RTEMS_SYSINIT_POSIX_USER_THREADS,
    3108         RTEMS_SYSINIT_ORDER_MIDDLE
    3109       );
    3110     #endif
     3087#ifdef CONFIGURE_INIT
     3088  #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \
     3089      defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE)
     3090    posix_initialization_threads_table * const
     3091      _Configuration_POSIX_Initialization_threads =
     3092        CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME;
     3093
     3094    const size_t _Configuration_POSIX_Initialization_thread_count =
     3095      CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE;
     3096
     3097    RTEMS_SYSINIT_ITEM(
     3098      _POSIX_Threads_Initialize_user_threads_body,
     3099      RTEMS_SYSINIT_POSIX_USER_THREADS,
     3100      RTEMS_SYSINIT_ORDER_MIDDLE
     3101    );
    31113102  #endif
    31123103#endif
     
    33243315 */
    33253316#if !defined(RTEMS_POSIX_API)
    3326   #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
    3327        (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
    3328        (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
    3329       defined(CONFIGURE_POSIX_INIT_THREAD_TABLE))
     3317  #if ((CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
     3318       (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0))
    33303319  #error "CONFIGURATION ERROR: POSIX API support not configured!!"
    33313320  #endif
  • cpukit/include/rtems/monitor.h

    r033f31c8 r54f35888  
    4444    RTEMS_MONITOR_OBJECT_MPCI,
    4545    RTEMS_MONITOR_OBJECT_SYMBOL,
    46     #if defined(RTEMS_POSIX_API)
    47       RTEMS_MONITOR_OBJECT_PTHREAD,
    48     #endif
     46    RTEMS_MONITOR_OBJECT_PTHREAD
    4947} rtems_monitor_object_type_t;
    5048
  • cpukit/include/rtems/posix/pthreadattrimpl.h

    r033f31c8 r54f35888  
    2626#include <rtems/score/assert.h>
    2727#include <rtems/posix/priorityimpl.h>
    28 #if defined(RTEMS_POSIX_API)
    2928#include <rtems/posix/threadsup.h>
    30 #endif
    3129
    3230#ifdef __cplusplus
  • cpukit/include/rtems/score/thread.h

    r033f31c8 r54f35888  
    7070/**@{*/
    7171
    72 #if defined(RTEMS_POSIX_API)
    73   #define RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE
    74 #endif
     72#define RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE
    7573
    7674/*
     
    8078#define RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT
    8179
    82 #if defined(RTEMS_POSIX_API)
    83   #define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API
    84 #endif
     80#define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API
    8581
    8682#if defined(RTEMS_DEBUG)
     
    704700  uint32_t pending_life_change_requests;
    705701
    706 #if defined(RTEMS_POSIX_API)
    707702  /**
    708703   * @brief The thread exit value.
     
    714709   */
    715710  void *exit_value;
    716 #endif
    717711} Thread_Life_control;
    718712
  • cpukit/libcsupport/src/resource_snapshot.c

    r033f31c8 r54f35888  
    2727#include <rtems/score/threadimpl.h>
    2828#include <rtems/score/wkspace.h>
    29 
    3029#include <rtems/posix/keyimpl.h>
    31 
    32 #include <rtems/rtems/barrierimpl.h>
    33 #include <rtems/extensionimpl.h>
    34 #include <rtems/rtems/dpmemimpl.h>
    35 #include <rtems/rtems/messageimpl.h>
    36 #include <rtems/rtems/partimpl.h>
    37 #include <rtems/rtems/ratemonimpl.h>
    38 #include <rtems/rtems/regionimpl.h>
    39 #include <rtems/rtems/semimpl.h>
    40 #include <rtems/rtems/tasksimpl.h>
    41 #include <rtems/rtems/timerimpl.h>
    42 
    43 #ifdef RTEMS_POSIX_API
    44   #include <rtems/posix/barrierimpl.h>
    45   #include <rtems/posix/mqueueimpl.h>
    46   #include <rtems/posix/muteximpl.h>
    47   #include <rtems/posix/psignal.h>
    48   #include <rtems/posix/pthreadimpl.h>
    49   #include <rtems/posix/semaphoreimpl.h>
    50   #include <rtems/posix/timerimpl.h>
    51 #endif
    5230
    5331static const struct {
     
    6543  { OBJECTS_CLASSIC_API, OBJECTS_RTEMS_SEMAPHORES },
    6644  { OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TASKS },
    67   { OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TIMERS }
     45  { OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TIMERS },
     46  { OBJECTS_POSIX_API, OBJECTS_POSIX_MESSAGE_QUEUES },
     47  { OBJECTS_POSIX_API, OBJECTS_POSIX_SEMAPHORES },
     48  { OBJECTS_POSIX_API, OBJECTS_POSIX_THREADS }
    6849  #ifdef RTEMS_POSIX_API
    6950    ,
    70     { OBJECTS_POSIX_API, OBJECTS_POSIX_MESSAGE_QUEUES },
    71     { OBJECTS_POSIX_API, OBJECTS_POSIX_SEMAPHORES },
    72     { OBJECTS_POSIX_API, OBJECTS_POSIX_THREADS },
    7351    { OBJECTS_POSIX_API, OBJECTS_POSIX_TIMERS }
    7452  #endif
  • cpukit/libmisc/monitor/mon-monitor.c

    r033f31c8 r54f35888  
    224224  #define RTEMS_MONITOR_POSIX_NEXT 19
    225225#endif
    226 #ifdef RTEMS_POSIX_API
    227226    { "pthread",
    228227      "Display information about the specified pthreads. "
     
    235234    },
    236235  #define RTEMS_MONITOR_DEBUGGER_NEXT (RTEMS_MONITOR_POSIX_NEXT + 1)
    237 #else
    238   #define RTEMS_MONITOR_DEBUGGER_NEXT RTEMS_MONITOR_POSIX_NEXT
    239 #endif
    240236#ifdef CPU_INVOKE_DEBUGGER
    241237    { "debugger",
  • cpukit/libmisc/monitor/mon-object.c

    r033f31c8 r54f35888  
    2626#include <rtems/rtems/semimpl.h>
    2727#include <rtems/rtems/tasksimpl.h>
    28 #if defined(RTEMS_POSIX_API)
    29   #include <rtems/posix/pthreadimpl.h>
    30 #endif
     28#include <rtems/posix/pthreadimpl.h>
    3129
    3230#include <stdio.h>
     
    131129      (rtems_monitor_object_dump_fn)        rtems_monitor_driver_dump,
    132130    },
    133 #if defined(RTEMS_POSIX_API)
    134131    { RTEMS_MONITOR_OBJECT_PTHREAD,
    135132      (void *) &_POSIX_Threads_Information.Objects,
     
    139136      (rtems_monitor_object_dump_header_fn) rtems_monitor_task_dump_header,
    140137      (rtems_monitor_object_dump_fn)        rtems_monitor_task_dump,
    141     },
    142 #endif
     138    }
    143139};
    144140
  • cpukit/posix/src/psxtransschedparam.c

    r033f31c8 r54f35888  
    3131    case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
    3232      return SCHED_OTHER;
    33 #if defined(RTEMS_POSIX_API)
    3433    case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
    3534      return SCHED_RR;
    36 #endif
    3735    case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
    3836      return SCHED_SPORADIC;
     
    6361  }
    6462
    65 #if defined(RTEMS_POSIX_API)
    6663  if ( policy == SCHED_RR ) {
    6764    *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
    6865    return 0;
    6966  }
    70 #endif
    7167
     68#if defined(RTEMS_POSIX_API)
    7269  if ( policy == SCHED_SPORADIC ) {
    7370    if ( (param->sched_ss_repl_period.tv_sec == 0) &&
     
    8784    return 0;
    8885  }
     86#endif
    8987
    9088  return EINVAL;
  • cpukit/posix/src/pthread.c

    r033f31c8 r54f35888  
    3535#include <rtems/posix/pthreadimpl.h>
    3636#include <rtems/posix/priorityimpl.h>
     37#if defined(RTEMS_POSIX_API)
    3738#include <rtems/posix/psignalimpl.h>
     39#endif
    3840#include <rtems/posix/config.h>
    3941#include <rtems/posix/keyimpl.h>
     
    4345Thread_Information _POSIX_Threads_Information;
    4446
     47#if defined(RTEMS_POSIX_API)
    4548void _POSIX_Threads_Sporadic_timer( Watchdog_Control *watchdog )
    4649{
     
    145148  _Thread_State_release( executing, &lock_context );
    146149}
     150#endif
    147151
    148152/*
     
    165169User_extensions_Control _POSIX_Threads_User_extensions = {
    166170  .Callouts = {
     171#if defined(RTEMS_POSIX_API)
    167172    .thread_create    = _POSIX_Threads_Create_extension,
    168     .thread_exitted   = _POSIX_Threads_Exitted_extension,
    169     .thread_terminate = _POSIX_Threads_Terminate_extension
     173    .thread_terminate = _POSIX_Threads_Terminate_extension,
     174#endif
     175    .thread_exitted   = _POSIX_Threads_Exitted_extension
    170176  }
    171177};
  • cpukit/posix/src/pthreadcreate.c

    r033f31c8 r54f35888  
    6363  const pthread_attr_t               *the_attr;
    6464  int                                 normal_prio;
    65   int                                 low_prio;
    6665  bool                                valid;
    6766  Priority_Control                    core_normal_prio;
    68   Priority_Control                    core_low_prio;
    6967  Thread_CPU_budget_algorithms        budget_algorithm;
    7068  Thread_CPU_budget_algorithm_callout budget_callout;
     
    7472  Thread_Control                     *executing;
    7573  const Scheduler_Control            *scheduler;
    76   POSIX_API_Control                  *api;
    77   const POSIX_API_Control            *executing_api;
    7874  int                                 schedpolicy = SCHED_RR;
    7975  struct sched_param                  schedparam;
     
    8278  int                                 error;
    8379  ISR_lock_Context                    lock_context;
     80#if defined(RTEMS_POSIX_API)
     81  int                                 low_prio;
     82  Priority_Control                    core_low_prio;
     83  POSIX_API_Control                  *api;
     84  const POSIX_API_Control            *executing_api;
     85#endif
    8486
    8587  if ( !start_routine )
     
    168170  }
    169171
     172#if defined(RTEMS_POSIX_API)
    170173  if ( schedpolicy == SCHED_SPORADIC ) {
    171174    low_prio = schedparam.sched_ss_low_priority;
     
    178181    return EINVAL;
    179182  }
     183#endif
    180184
    181185  if ( the_attr->affinityset == NULL ) {
     
    243247   }
    244248
     249  the_thread->was_created_with_inherited_scheduler =
     250    ( the_attr->inheritsched == PTHREAD_INHERIT_SCHED );
     251
     252#if defined(RTEMS_POSIX_API)
    245253  /*
    246254   *  finish initializing the per API structure
     
    250258
    251259  api->signals_unblocked = executing_api->signals_unblocked;
    252 
    253   the_thread->was_created_with_inherited_scheduler =
    254     ( the_attr->inheritsched == PTHREAD_INHERIT_SCHED );
    255260
    256261  _Priority_Node_set_priority( &api->Sporadic.Low_priority, core_low_prio );
     
    265270    _POSIX_Threads_Sporadic_timer( &api->Sporadic.Timer );
    266271  }
     272#endif
    267273
    268274  /*
  • cpukit/posix/src/pthreadsetschedparam.c

    r033f31c8 r54f35888  
    4141{
    4242  const Scheduler_Control *scheduler;
    43   POSIX_API_Control       *api;
    4443  int                      normal_prio;
    45   int                      low_prio;
    4644  bool                     valid;
    4745  Priority_Control         core_normal_prio;
     46#if defined(RTEMS_POSIX_API)
     47  POSIX_API_Control       *api;
     48  int                      low_prio;
    4849  Priority_Control         core_low_prio;
     50#endif
    4951
    5052  normal_prio = param->sched_priority;
     
    5759  }
    5860
     61#if defined(RTEMS_POSIX_API)
    5962  if ( policy == SCHED_SPORADIC ) {
    6063    low_prio = param->sched_ss_low_priority;
     
    7174
    7275  _Watchdog_Per_CPU_remove_ticks( &api->Sporadic.Timer );
     76#endif
    7377
    7478  _Priority_Node_set_priority( &the_thread->Real_priority, core_normal_prio );
    7579
     80#if defined(RTEMS_POSIX_API)
    7681  if ( _Priority_Node_is_active( &api->Sporadic.Low_priority ) ) {
    7782    _Thread_Priority_add(
     
    8792    _Priority_Node_set_inactive( &api->Sporadic.Low_priority );
    8893  } else {
     94#endif
    8995    _Thread_Priority_changed(
    9096      the_thread,
     
    9399      queue_context
    94100    );
     101#if defined(RTEMS_POSIX_API)
    95102  }
     103#endif
    96104
    97105  the_thread->budget_algorithm = budget_algorithm;
    98106  the_thread->budget_callout   = budget_callout;
    99107
     108#if defined(RTEMS_POSIX_API)
    100109  _Priority_Node_set_priority( &api->Sporadic.Low_priority, core_low_prio );
    101110  api->Sporadic.sched_ss_repl_period = param->sched_ss_repl_period;
     
    106115    _POSIX_Threads_Sporadic_timer_insert( the_thread, api );
    107116  } else {
     117#endif
    108118    the_thread->cpu_time_budget =
    109119      rtems_configuration_get_ticks_per_timeslice();
     120#if defined(RTEMS_POSIX_API)
    110121  }
     122#endif
    111123
    112124  return 0;
  • cpukit/rtems/src/rtemsobjectgetapiclassname.c

    r033f31c8 r54f35888  
    4444
    4545static const rtems_assoc_t rtems_object_api_posix_assoc[] = {
    46 #ifdef RTEMS_POSIX_API
    4746  { "Thread",                  OBJECTS_POSIX_THREADS, 0},
    4847  { "Key",                     OBJECTS_POSIX_KEYS, 0},
     48#ifdef RTEMS_POSIX_API
    4949  { "Interrupt",               OBJECTS_POSIX_INTERRUPTS, 0},
    5050#endif
  • cpukit/score/src/threaditerate.c

    r033f31c8 r54f35888  
    3030    Objects_Maximum            i;
    3131
    32 #if !defined(RTEMS_POSIX_API)
    3332    if ( _Objects_Information_table[ api_index ] == NULL ) {
    3433      continue;
    3534    }
    36 #endif
    3735
    3836    information = _Objects_Information_table[ api_index ][ 1 ];
  • cpukit/score/src/threadrestart.c

    r033f31c8 r54f35888  
    7878typedef struct {
    7979  Thread_queue_Context  Base;
    80 #if defined(RTEMS_POSIX_API)
    8180  void                 *exit_value;
    82 #endif
    8381} Thread_Join_context;
    8482
    85 #if defined(RTEMS_POSIX_API)
    8683static Thread_Control *_Thread_Join_flush_filter(
    8784  Thread_Control       *the_thread,
     
    9895  return the_thread;
    9996}
    100 #endif
    10197
    10298static void _Thread_Wake_up_joining_threads( Thread_Control *the_thread )
     
    104100  Thread_Join_context join_context;
    105101
    106 #if defined(RTEMS_POSIX_API)
    107102  join_context.exit_value = the_thread->Life.exit_value;
    108 #endif
    109103
    110104  _Thread_queue_Context_initialize( &join_context.Base );
     
    113107    &the_thread->Join_queue.Queue,
    114108    THREAD_JOIN_TQ_OPERATIONS,
    115 #if defined(RTEMS_POSIX_API)
    116109    _Thread_Join_flush_filter,
    117 #else
    118     _Thread_queue_Flush_default_filter,
    119 #endif
    120110    &join_context.Base
    121111  );
     
    290280)
    291281{
    292 #if defined(RTEMS_POSIX_API)
    293282  ISR_lock_Context lock_context;
    294283
     
    309298    _Thread_State_release( executing, &lock_context );
    310299  }
    311 #endif
    312300
    313301  return cpu_self;
     
    443431  _Assert( _Thread_State_is_owner( the_thread ) );
    444432
    445 #if defined(RTEMS_POSIX_API)
    446433  executing->Wait.return_argument = NULL;
    447 #endif
    448434
    449435  _Thread_queue_Context_set_thread_state( queue_context, waiting_for_join );
     
    461447)
    462448{
    463 #if defined(RTEMS_POSIX_API)
    464449  the_thread->Life.exit_value = exit_value;
    465 #endif
    466450}
    467451
  • cpukit/score/src/wkspace.c

    r033f31c8 r54f35888  
    5454  );
    5555
    56 #if defined(RTEMS_POSIX_API)
    5756  thread_count += rtems_resource_maximum_per_allocation(
    5857    _Configuration_POSIX_Maximum_threads
    5958  );
    60 #endif
    6159
    6260  return thread_count;
Note: See TracChangeset for help on using the changeset viewer.