4.115
Last change
on this file since 25f5730f was
a92c488,
checked in by Sebastian Huber <sebastian.huber@…>, on 05/28/14 at 15:56:45
|
score: _Scheduler_Get_affinity()
Drop scheduler parameter. Coding style.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #if HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/score/schedulerimpl.h> |
---|
20 | |
---|
21 | #if defined(__RTEMS_HAVE_SYS_CPUSET_H__) |
---|
22 | |
---|
23 | bool _Scheduler_Get_affinity( |
---|
24 | Thread_Control *the_thread, |
---|
25 | size_t cpusetsize, |
---|
26 | cpu_set_t *cpuset |
---|
27 | ) |
---|
28 | { |
---|
29 | const Scheduler_Control *scheduler = _Scheduler_Get( the_thread ); |
---|
30 | |
---|
31 | if ( !_CPU_set_Is_large_enough( cpusetsize ) ) { |
---|
32 | return false; |
---|
33 | } |
---|
34 | |
---|
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 |
---|
51 | } |
---|
52 | |
---|
53 | #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */ |
---|
Note: See
TracBrowser
for help on using the repository browser.