summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-22 21:29:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 08:55:43 +0200
commit9f10911d2b653859f7199eaed5a85a24803711dc (patch)
tree3dcee8b9f5ad179e8a82b852c7ad5837d30abbb0 /cpukit/score/include
parentscore: Fix priority message queue insert (diff)
downloadrtems-9f10911d2b653859f7199eaed5a85a24803711dc.tar.bz2
score: Delete Thread_queue_Control::state
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/coresemimpl.h8
-rw-r--r--cpukit/score/include/rtems/score/threadq.h4
-rw-r--r--cpukit/score/include/rtems/score/threadqimpl.h4
3 files changed, 9 insertions, 7 deletions
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h
index 99303d7aa3..6a3a212f34 100644
--- a/cpukit/score/include/rtems/score/coresemimpl.h
+++ b/cpukit/score/include/rtems/score/coresemimpl.h
@@ -22,6 +22,7 @@
#include <rtems/score/coresem.h>
#include <rtems/score/threaddispatch.h>
#include <rtems/score/threadqimpl.h>
+#include <rtems/score/statesimpl.h>
#ifdef __cplusplus
extern "C" {
@@ -238,7 +239,12 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable(
executing->Wait.id = id;
_ISR_lock_ISR_enable( lock_context );
- _Thread_queue_Enqueue( &the_semaphore->Wait_queue, executing, timeout );
+ _Thread_queue_Enqueue(
+ &the_semaphore->Wait_queue,
+ executing,
+ STATES_WAITING_FOR_SEMAPHORE,
+ timeout
+ );
_Thread_Enable_dispatch();
}
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index 6dcdf41aaa..00b9221356 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -66,10 +66,6 @@ typedef struct {
Thread_blocking_operation_States sync_state;
/** This field indicates the thread queue's blocking discipline. */
Thread_queue_Disciplines discipline;
- /** This indicates the blocking state for threads waiting on this
- * thread queue.
- */
- States_Control state;
/** This is the status value returned to threads which timeout while
* waiting on this thread queue.
*/
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
index 57bdf054b9..c1bd902f33 100644
--- a/cpukit/score/include/rtems/score/threadqimpl.h
+++ b/cpukit/score/include/rtems/score/threadqimpl.h
@@ -71,6 +71,7 @@ Thread_Control *_Thread_queue_Dequeue(
*
* @param[in] the_thread_queue pointer to threadq
* @param[in] the_thread the thread to enqueue
+ * @param[in] state is the new state of the thread
* @param[in] timeout interval to wait
*
* - INTERRUPT LATENCY:
@@ -79,6 +80,7 @@ Thread_Control *_Thread_queue_Dequeue(
void _Thread_queue_Enqueue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
+ States_Control state,
Watchdog_Interval timeout
);
@@ -170,13 +172,11 @@ void _Thread_queue_Flush(
*
* @param[in] the_thread_queue is the pointer to a threadq header
* @param[in] the_discipline is the queueing discipline
- * @param[in] state is the state of waiting threads
* @param[in] timeout_status is the return on a timeout
*/
void _Thread_queue_Initialize(
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
- States_Control state,
uint32_t timeout_status
);