summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadq.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-24 06:13:11 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-24 08:46:20 +0100
commit620b23ece54a0bb43189bb9c0f14adf447cbafe6 (patch)
tree10aa72eb67ac01ab85f932ac25c09ba3e5d97da8 /cpukit/score/include/rtems/score/threadq.h
parentscore: Fix interrupt profiling (diff)
downloadrtems-620b23ece54a0bb43189bb9c0f14adf447cbafe6.tar.bz2
score: Optimize _Thread_queue_Enqueue()
Move thread state for _Thread_queue_Enqueue() to the thread queue context. This reduces the parameter count of _Thread_queue_Enqueue() from five to four (ARM for example has only four function parameter registers). Since the thread state is used after several function calls inside _Thread_queue_Enqueue() this parameter was saved on the stack previously.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadq.h')
-rw-r--r--cpukit/score/include/rtems/score/threadq.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index 61ce5fbee2..dec8e13e9e 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -24,6 +24,7 @@
#include <rtems/score/object.h>
#include <rtems/score/priority.h>
#include <rtems/score/rbtree.h>
+#include <rtems/score/states.h>
#include <rtems/score/watchdog.h>
#ifdef __cplusplus
@@ -193,6 +194,11 @@ struct Thread_queue_Context {
Thread_queue_Lock_context Lock_context;
/**
+ * @brief The thread state for _Thread_queue_Enqueue().
+ */
+ States_Control thread_state;
+
+ /**
* @brief The enqueue callout for _Thread_queue_Enqueue().
*
* The callout is invoked after the release of the thread queue lock with