summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-07 16:54:40 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-09 15:27:30 +0100
commit1f5bee3d85405d42a7f35caf3ff0c190789afd60 (patch)
treed02b999781b8a135d079d23307b4396eeafc51fd /cpukit/score
parentscore: Rename _Scheduler_Assignments (diff)
downloadrtems-1f5bee3d85405d42a7f35caf3ff0c190789afd60.tar.bz2
score: Add and use Thread_Control::is_idle
Update #2797.
Diffstat (limited to '')
-rw-r--r--cpukit/score/include/rtems/score/thread.h2
-rw-r--r--cpukit/score/src/threadcreateidle.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 7711f706f3..95b977e7ba 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -754,6 +754,8 @@ struct _Thread_Control {
SMP_lock_Stats Potpourri_stats;
#endif
+ /** This field is true if the thread is an idle thread. */
+ bool is_idle;
#if defined(RTEMS_MULTIPROCESSING)
/** This field is true if the thread is offered globally */
bool is_global;
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index 89e5d60a18..d8dd2b4197 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -72,6 +72,7 @@ static void _Thread_Create_idle_for_CPU( Per_CPU_Control *cpu )
cpu->heir =
cpu->executing = idle;
+ idle->is_idle = true;
idle->Start.Entry.adaptor = _Thread_Entry_adaptor_idle;
idle->Start.Entry.Kinds.Idle.entry = rtems_configuration_get_idle_task();