summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-10 20:32:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-10 20:32:48 +0000
commit3a0827287dc2c2328e953fead2b883501053c444 (patch)
treeb531e6db204a3acaa8d7ab7c434b90aed1790b5c /cpukit
parent2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-3a0827287dc2c2328e953fead2b883501053c444.tar.bz2
2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com>
* configure.ac, score/src/threadqenqueuepriority.c: Add RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY to give user ability to disable the loop in _Thread_queue_Enqueue_priority from being unrolled. This reduces code size and makes coverage analysis easier.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog7
-rw-r--r--cpukit/configure.ac6
-rw-r--r--cpukit/score/src/threadqenqueuepriority.c13
3 files changed, 23 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 46815a926e..c9abd19ace 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * configure.ac, score/src/threadqenqueuepriority.c: Add
+ RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY to give user ability to
+ disable the loop in _Thread_queue_Enqueue_priority from being
+ unrolled. This reduces code size and makes coverage analysis easier.
+
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/watchdogadjusttochain.c: Rework to ease code coverage
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 6d377d26fd..32c4fcb8b2 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -232,6 +232,12 @@ RTEMS_CPUOPT([__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__],
[1],
[disable inlining _Thread_Enable_dispatch])
+## This improves both the size and coverage analysis.
+RTEMS_CPUOPT([__RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY__],
+ [test x"${RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY}" = x"1"],
+ [1],
+ [disable inlining _Thread_queue_Enqueue_priority])
+
## This gives the same behavior as 4.8 and older
RTEMS_CPUOPT([__RTEMS_STRICT_ORDER_MUTEX__],
[test x"${ENABLE_STRICT_ORDER_MUTEX}" = x"1"],
diff --git a/cpukit/score/src/threadqenqueuepriority.c b/cpukit/score/src/threadqenqueuepriority.c
index cad998cf87..f2652ea4b0 100644
--- a/cpukit/score/src/threadqenqueuepriority.c
+++ b/cpukit/score/src/threadqenqueuepriority.c
@@ -1,8 +1,7 @@
/*
- * Thread Queue Handler
+ * Thread Queue Handler - Enqueue By Priority
*
- *
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -25,6 +24,14 @@
#include <rtems/score/threadq.h>
#include <rtems/score/tqdata.h>
+/*
+ * Support the user forcing the unrolling to be disabled.
+ */
+#if __RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY__
+ #undef CPU_UNROLL_ENQUEUE_PRIORITY
+ #define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
+#endif
+
/*PAGE
*
* _Thread_queue_Enqueue_priority