Changeset 390e73c4 in rtems


Ignore:
Timestamp:
May 12, 2014, 1:55:25 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
c8b7b32
Parents:
fa0a9a18
git-author:
Sebastian Huber <sebastian.huber@…> (05/12/14 13:55:25)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/12/14 13:56:42)
Message:

score: Move out of RTEMS_HAVE_SYS_CPUSET_H

Move _Scheduler_Get() and _Scheduler_Set() out of the #if
defined(RTEMS_HAVE_SYS_CPUSET_H) block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/schedulerimpl.h

    rfa0a9a18 r390e73c4  
    330330#endif
    331331}
    332 
    333 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    334 
    335 RTEMS_INLINE_ROUTINE void _Scheduler_Get_processor_set(
    336   const Scheduler_Control *scheduler,
    337   size_t                   cpusetsize,
    338   cpu_set_t               *cpuset
    339 )
    340 {
    341   uint32_t cpu_count = _SMP_Get_processor_count();
    342   uint32_t cpu_index;
    343 
    344   CPU_ZERO_S( cpusetsize, cpuset );
    345 
    346   for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
    347 #if defined(RTEMS_SMP)
    348     if ( _Scheduler_Has_processor_ownership( scheduler, cpu_index ) ) {
    349       CPU_SET_S( (int) cpu_index, cpusetsize, cpuset );
    350     }
    351 #else
    352     (void) scheduler;
    353 
    354     CPU_SET_S( (int) cpu_index, cpusetsize, cpuset );
    355 #endif
    356   }
    357 }
    358 
    359 RTEMS_INLINE_ROUTINE bool _Scheduler_default_Get_affinity_body(
    360   const Scheduler_Control *scheduler,
    361   Thread_Control          *the_thread,
    362   size_t                   cpusetsize,
    363   cpu_set_t               *cpuset
    364 )
    365 {
    366   (void) the_thread;
    367 
    368   _Scheduler_Get_processor_set( scheduler, cpusetsize, cpuset );
    369 
    370   return true;
    371 }
    372 
    373 bool _Scheduler_Get_affinity(
    374   const Scheduler_Control *scheduler,
    375   Thread_Control          *the_thread,
    376   size_t                   cpusetsize,
    377   cpu_set_t               *cpuset
    378 );
    379332
    380333RTEMS_INLINE_ROUTINE const Scheduler_Control *_Scheduler_Get(
     
    412365}
    413366
     367#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
     368
     369RTEMS_INLINE_ROUTINE void _Scheduler_Get_processor_set(
     370  const Scheduler_Control *scheduler,
     371  size_t                   cpusetsize,
     372  cpu_set_t               *cpuset
     373)
     374{
     375  uint32_t cpu_count = _SMP_Get_processor_count();
     376  uint32_t cpu_index;
     377
     378  CPU_ZERO_S( cpusetsize, cpuset );
     379
     380  for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
     381#if defined(RTEMS_SMP)
     382    if ( _Scheduler_Has_processor_ownership( scheduler, cpu_index ) ) {
     383      CPU_SET_S( (int) cpu_index, cpusetsize, cpuset );
     384    }
     385#else
     386    (void) scheduler;
     387
     388    CPU_SET_S( (int) cpu_index, cpusetsize, cpuset );
     389#endif
     390  }
     391}
     392
     393RTEMS_INLINE_ROUTINE bool _Scheduler_default_Get_affinity_body(
     394  const Scheduler_Control *scheduler,
     395  Thread_Control          *the_thread,
     396  size_t                   cpusetsize,
     397  cpu_set_t               *cpuset
     398)
     399{
     400  (void) the_thread;
     401
     402  _Scheduler_Get_processor_set( scheduler, cpusetsize, cpuset );
     403
     404  return true;
     405}
     406
     407bool _Scheduler_Get_affinity(
     408  const Scheduler_Control *scheduler,
     409  Thread_Control          *the_thread,
     410  size_t                   cpusetsize,
     411  cpu_set_t               *cpuset
     412);
     413
    414414RTEMS_INLINE_ROUTINE bool _Scheduler_default_Set_affinity_body(
    415415  const Scheduler_Control *scheduler,
Note: See TracChangeset for help on using the changeset viewer.