5
Last change
on this file since 2548d14 was
ca1e546e,
checked in by Sebastian Huber <sebastian.huber@…>, on 02/02/17 at 15:24:05
|
score: Improve scheduler helping protocol
Only register ask for help requests in the scheduler unblock and yield
operations. The actual ask for help operation is carried out during
_Thread_Do_dispatch() on a processor related to the thread. This yields
a better separation of scheduler instances. A thread of one scheduler
instance should not be forced to carry out too much work for threads on
other scheduler instances.
Update #2556.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Scheduler Priority Yield |
---|
5 | * @ingroup ScoreScheduler |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * Copyright (C) 2010 Gedare Bloom. |
---|
10 | * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/score/schedulerpriorityimpl.h> |
---|
22 | #include <rtems/score/threadimpl.h> |
---|
23 | |
---|
24 | void _Scheduler_priority_Yield( |
---|
25 | const Scheduler_Control *scheduler, |
---|
26 | Thread_Control *the_thread, |
---|
27 | Scheduler_Node *node |
---|
28 | ) |
---|
29 | { |
---|
30 | Scheduler_priority_Node *the_node; |
---|
31 | Chain_Control *ready_chain; |
---|
32 | |
---|
33 | the_node = _Scheduler_priority_Node_downcast( node ); |
---|
34 | ready_chain = the_node->Ready_queue.ready_chain; |
---|
35 | |
---|
36 | if ( !_Chain_Has_only_one_node( ready_chain ) ) { |
---|
37 | _Chain_Extract_unprotected( &the_thread->Object.Node ); |
---|
38 | _Chain_Append_unprotected( ready_chain, &the_thread->Object.Node ); |
---|
39 | } |
---|
40 | |
---|
41 | _Scheduler_priority_Schedule_body( scheduler, the_thread, true ); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.