4.115
Last change
on this file since e1598a6 was
e1598a6,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/04/14 at 08:56:36
|
score: Static scheduler configuration
Do not allocate the scheduler control structures from the workspace.
This is a preparation step for configuration of clustered/partitioned
schedulers on SMP.
|
-
Property mode set to
100644
|
File size:
869 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Scheduler Default Get Affinity Operation |
---|
5 | * |
---|
6 | * @ingroup ScoreScheduler |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * COPYRIGHT (c) 2014. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #if HAVE_CONFIG_H |
---|
19 | #include "config.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <rtems/score/schedulerimpl.h> |
---|
23 | #include <rtems/score/cpusetimpl.h> |
---|
24 | |
---|
25 | bool _Scheduler_default_Get_affinity( |
---|
26 | const Scheduler_Control *scheduler, |
---|
27 | Thread_Control *thread, |
---|
28 | size_t cpusetsize, |
---|
29 | cpu_set_t *cpuset |
---|
30 | ) |
---|
31 | { |
---|
32 | const CPU_set_Control *ctl; |
---|
33 | |
---|
34 | (void) scheduler; |
---|
35 | (void) thread; |
---|
36 | |
---|
37 | ctl = _CPU_set_Default(); |
---|
38 | if ( cpusetsize != ctl->setsize ) { |
---|
39 | return false; |
---|
40 | } |
---|
41 | |
---|
42 | CPU_COPY( cpuset, ctl->set ); |
---|
43 | |
---|
44 | return true; |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.