5
Last change
on this file since 21275b58 was
7097962,
checked in by Sebastian Huber <sebastian.huber@…>, on 08/29/18 at 07:43:44
|
score: Add thread pin/unpin support
Add support to temporarily pin a thread to its current processor. This
may be used to access per-processor data structures in critical sections
with enabled thread dispatching, e.g. a pinned thread is allowed to
block.
Update #3508.
|
-
Property mode set to
100644
|
File size:
765 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2018 embedded brains GmbH |
---|
3 | * |
---|
4 | * The license and distribution terms for this file may be |
---|
5 | * found in the file LICENSE in this distribution or at |
---|
6 | * http://www.rtems.org/license/LICENSE. |
---|
7 | */ |
---|
8 | |
---|
9 | #if HAVE_CONFIG_H |
---|
10 | #include "config.h" |
---|
11 | #endif |
---|
12 | |
---|
13 | #include <rtems/score/scheduler.h> |
---|
14 | #include <rtems/score/interr.h> |
---|
15 | #include <rtems/score/smpimpl.h> |
---|
16 | |
---|
17 | void _Scheduler_default_Pin_or_unpin( |
---|
18 | const Scheduler_Control *scheduler, |
---|
19 | Thread_Control *the_thread, |
---|
20 | Scheduler_Node *node, |
---|
21 | struct Per_CPU_Control *cpu |
---|
22 | ) |
---|
23 | { |
---|
24 | (void) scheduler; |
---|
25 | (void) the_thread; |
---|
26 | (void) node; |
---|
27 | (void) cpu; |
---|
28 | |
---|
29 | if ( _SMP_Get_processor_count() > 1 ) { |
---|
30 | _Terminate( |
---|
31 | RTEMS_FATAL_SOURCE_SMP, |
---|
32 | SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED |
---|
33 | ); |
---|
34 | } |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.