summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h6
-rw-r--r--cpukit/score/src/threadq.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index ced3c00980..01d0c3a25b 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -184,6 +184,12 @@ void _Scheduler_default_Start_idle(
Per_CPU_Control *processor
);
+/*
+ * See also PR2174: Memory corruption with EDF scheduler and thread priority
+ * queues.
+ */
+extern const bool _Scheduler_FIXME_thread_priority_queues_are_broken;
+
/**@}*/
#ifdef __cplusplus
diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c
index 463330a2f6..69b687fe1c 100644
--- a/cpukit/score/src/threadq.c
+++ b/cpukit/score/src/threadq.c
@@ -20,6 +20,7 @@
#include <rtems/score/threadqimpl.h>
#include <rtems/score/chainimpl.h>
+#include <rtems/score/scheduler.h>
void _Thread_queue_Initialize(
Thread_queue_Control *the_thread_queue,
@@ -28,6 +29,10 @@ void _Thread_queue_Initialize(
uint32_t timeout_status
)
{
+ if ( _Scheduler_FIXME_thread_priority_queues_are_broken ) {
+ the_discipline = THREAD_QUEUE_DISCIPLINE_FIFO;
+ }
+
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;