Changeset a92c488 in rtems


Ignore:
Timestamp:
May 28, 2014, 3:56:45 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
25f5730f
Parents:
d7a1863b
git-author:
Sebastian Huber <sebastian.huber@…> (05/28/14 15:56:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/02/14 06:28:42)
Message:

score: _Scheduler_Get_affinity()

Drop scheduler parameter. Coding style.

Location:
cpukit
Files:
4 edited

Legend:

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

    rd7a1863b ra92c488  
    4949    case OBJECTS_LOCAL:
    5050      ok = _Scheduler_Get_affinity(
    51         _Scheduler_Get( the_thread ),
    5251        the_thread,
    5352        cpusetsize,
  • cpukit/rtems/src/taskgetaffinity.c

    rd7a1863b ra92c488  
    4646    case OBJECTS_LOCAL:
    4747      ok = _Scheduler_Get_affinity(
    48         _Scheduler_Get( the_thread ),
    4948        the_thread,
    5049        cpusetsize,
  • cpukit/score/include/rtems/score/schedulerimpl.h

    rd7a1863b ra92c488  
    407407
    408408bool _Scheduler_Get_affinity(
    409   const Scheduler_Control *scheduler,
    410   Thread_Control          *the_thread,
    411   size_t                   cpusetsize,
    412   cpu_set_t               *cpuset
     409  Thread_Control *the_thread,
     410  size_t          cpusetsize,
     411  cpu_set_t      *cpuset
    413412);
    414413
  • cpukit/score/src/schedulergetaffinity.c

    rd7a1863b ra92c488  
    2222
    2323bool _Scheduler_Get_affinity(
    24   const Scheduler_Control *scheduler,
    25   Thread_Control          *the_thread,
    26   size_t                   cpusetsize,
    27   cpu_set_t               *cpuset
     24  Thread_Control *the_thread,
     25  size_t          cpusetsize,
     26  cpu_set_t      *cpuset
    2827)
    2928{
    30   bool ok;
     29  const Scheduler_Control *scheduler = _Scheduler_Get( the_thread );
    3130
    32   if ( _CPU_set_Is_large_enough( cpusetsize ) ) {
    33 #if defined(RTEMS_SMP)
    34     ok = ( *scheduler->Operations.get_affinity )(
    35       scheduler,
    36       the_thread,
    37       cpusetsize,
    38       cpuset
    39     );
    40 #else
    41     ok = _Scheduler_default_Get_affinity_body(
    42       scheduler,
    43       the_thread,
    44       cpusetsize,
    45       cpuset
    46     );
    47 #endif
    48   } else {
    49     ok = false;
     31  if ( !_CPU_set_Is_large_enough( cpusetsize ) ) {
     32    return false;
    5033  }
    5134
    52   return ok;
     35
     36#if defined(RTEMS_SMP)
     37  return ( *scheduler->Operations.get_affinity )(
     38    scheduler,
     39    the_thread,
     40    cpusetsize,
     41    cpuset
     42  );
     43#else
     44  return _Scheduler_default_Get_affinity_body(
     45    scheduler,
     46    the_thread,
     47    cpusetsize,
     48    cpuset
     49  );
     50#endif
    5351}
    5452
Note: See TracChangeset for help on using the changeset viewer.