[rtems commit] score: Delete Thread_queue_Control::timeout_status
Sebastian Huber
sebh at rtems.org
Wed May 20 07:12:03 UTC 2015
Module: rtems
Branch: master
Commit: f5d6c8b58daf82637bbcf7edb374f65227661a0c
Changeset: http://git.rtems.org/rtems/commit/?id=f5d6c8b58daf82637bbcf7edb374f65227661a0c
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Apr 27 16:25:52 2015 +0200
score: Delete Thread_queue_Control::timeout_status
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory
usage.
---
cpukit/posix/src/condinit.c | 3 +--
cpukit/posix/src/condwaitsupp.c | 3 ++-
cpukit/posix/src/psignal.c | 3 +--
cpukit/posix/src/pthread.c | 6 +-----
cpukit/posix/src/pthreadjoin.c | 3 ++-
cpukit/posix/src/sigtimedwait.c | 1 +
cpukit/rtems/src/eventmp.c | 3 ++-
cpukit/rtems/src/msgmp.c | 6 ++++--
cpukit/rtems/src/partmp.c | 3 ++-
cpukit/rtems/src/regioncreate.c | 3 +--
cpukit/rtems/src/regiongetsegment.c | 3 ++-
cpukit/rtems/src/regionmp.c | 3 ++-
cpukit/rtems/src/semmp.c | 3 ++-
cpukit/rtems/src/signalmp.c | 3 ++-
cpukit/rtems/src/taskmp.c | 3 ++-
cpukit/score/include/rtems/score/coresemimpl.h | 1 +
cpukit/score/include/rtems/score/mpciimpl.h | 4 +++-
cpukit/score/include/rtems/score/threadq.h | 5 -----
cpukit/score/include/rtems/score/threadqimpl.h | 12 +++++++-----
cpukit/score/src/corebarrier.c | 3 +--
cpukit/score/src/corebarrierwait.c | 1 +
cpukit/score/src/coremsg.c | 3 +--
cpukit/score/src/coremsgseize.c | 1 +
cpukit/score/src/coremsgsubmit.c | 3 ++-
cpukit/score/src/coremutex.c | 3 +--
cpukit/score/src/coremutexseize.c | 1 +
cpukit/score/src/corerwlock.c | 3 +--
cpukit/score/src/corerwlockobtainread.c | 1 +
cpukit/score/src/corerwlockobtainwrite.c | 1 +
cpukit/score/src/coresem.c | 3 +--
cpukit/score/src/coresemseize.c | 1 +
cpukit/score/src/mpci.c | 9 +++++----
cpukit/score/src/threadq.c | 7 ++-----
cpukit/score/src/threadqenqueue.c | 6 ++----
34 files changed, 60 insertions(+), 57 deletions(-)
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index c1c14b8..0b61d14 100644
--- a/cpukit/posix/src/condinit.c
+++ b/cpukit/posix/src/condinit.c
@@ -64,8 +64,7 @@ int pthread_cond_init(
_Thread_queue_Initialize(
&the_cond->Wait_queue,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- ETIMEDOUT
+ THREAD_QUEUE_DISCIPLINE_FIFO
);
_Objects_Open_u32(
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 8a9e235..5a71dc3 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -83,7 +83,8 @@ int _POSIX_Condition_variables_Wait_support(
executing,
STATES_WAITING_FOR_CONDITION_VARIABLE
| STATES_INTERRUPTIBLE_BY_SIGNAL,
- timeout
+ timeout,
+ ETIMEDOUT
);
_Objects_Put( &the_cond->Object );
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index 543b558..3ca0723 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -190,8 +190,7 @@ void _POSIX_signals_Manager_Initialization(void)
*/
_Thread_queue_Initialize(
&_POSIX_signals_Wait_queue,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- EAGAIN
+ THREAD_QUEUE_DISCIPLINE_FIFO
);
/* XXX status codes */
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 2817891..a3a73f1 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -235,11 +235,7 @@ static bool _POSIX_Threads_Create_extension(
_POSIX_signals_Action_handler
);
- _Thread_queue_Initialize(
- &api->Join_List,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- 0
- );
+ _Thread_queue_Initialize( &api->Join_List, THREAD_QUEUE_DISCIPLINE_FIFO );
_Watchdog_Initialize(
&api->Sporadic_timer,
diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c
index 48fb7d5..f736131 100644
--- a/cpukit/posix/src/pthreadjoin.c
+++ b/cpukit/posix/src/pthreadjoin.c
@@ -71,7 +71,8 @@ on_EINTR:
&api->Join_List,
executing,
STATES_WAITING_FOR_JOIN | STATES_INTERRUPTIBLE_BY_SIGNAL,
- WATCHDOG_NO_TIMEOUT
+ WATCHDOG_NO_TIMEOUT,
+ 0
);
}
_Objects_Put( &the_thread->Object );
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index e988761..fb8a243 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -160,6 +160,7 @@ int sigtimedwait(
executing,
STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
interval,
+ EAGAIN,
&lock_context
);
_Thread_Enable_dispatch();
diff --git a/cpukit/rtems/src/eventmp.c b/cpukit/rtems/src/eventmp.c
index b2a5ce8..e2e43fc 100644
--- a/cpukit/rtems/src/eventmp.c
+++ b/cpukit/rtems/src/eventmp.c
@@ -59,7 +59,8 @@ rtems_status_code _Event_MP_Send_request_packet (
_MPCI_Send_request_packet(
_Objects_Get_node( event_id ),
&the_packet->Prefix,
- STATES_READY
+ STATES_READY,
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index ddad64a..83b5a31 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -148,7 +148,8 @@ rtems_status_code _Message_queue_MP_Send_request_packet (
return (rtems_status_code) _MPCI_Send_request_packet(
_Objects_Get_node(message_queue_id),
&the_packet->Prefix,
- STATES_WAITING_FOR_MESSAGE
+ STATES_WAITING_FOR_MESSAGE,
+ RTEMS_TIMEOUT
);
break;
@@ -173,7 +174,8 @@ rtems_status_code _Message_queue_MP_Send_request_packet (
return (rtems_status_code) _MPCI_Send_request_packet(
_Objects_Get_node(message_queue_id),
&the_packet->Prefix,
- STATES_WAITING_FOR_MESSAGE
+ STATES_WAITING_FOR_MESSAGE,
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/rtems/src/partmp.c b/cpukit/rtems/src/partmp.c
index f41fd22..9593ce5 100644
--- a/cpukit/rtems/src/partmp.c
+++ b/cpukit/rtems/src/partmp.c
@@ -104,7 +104,8 @@ rtems_status_code _Partition_MP_Send_request_packet (
_MPCI_Send_request_packet(
_Objects_Get_node( partition_id ),
&the_packet->Prefix,
- STATES_READY /* Not used */
+ STATES_READY, /* Not used */
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c
index aa95f32..409510c 100644
--- a/cpukit/rtems/src/regioncreate.c
+++ b/cpukit/rtems/src/regioncreate.c
@@ -74,8 +74,7 @@ rtems_status_code rtems_region_create(
_Thread_queue_Initialize(
&the_region->Wait_queue,
_Attributes_Is_priority( attribute_set ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- RTEMS_TIMEOUT
+ THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO
);
the_region->maximum_segment_size = _Heap_Initialize(
diff --git a/cpukit/rtems/src/regiongetsegment.c b/cpukit/rtems/src/regiongetsegment.c
index cef90e7..1e5c795 100644
--- a/cpukit/rtems/src/regiongetsegment.c
+++ b/cpukit/rtems/src/regiongetsegment.c
@@ -87,7 +87,8 @@ rtems_status_code rtems_region_get_segment(
&the_region->Wait_queue,
executing,
STATES_WAITING_FOR_SEGMENT,
- timeout
+ timeout,
+ RTEMS_TIMEOUT
);
_Objects_Put( &the_region->Object );
diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c
index 8bce822..135a69d 100644
--- a/cpukit/rtems/src/regionmp.c
+++ b/cpukit/rtems/src/regionmp.c
@@ -102,7 +102,8 @@ rtems_status_code _Region_MP_Send_request_packet (
return (rtems_status_code) _MPCI_Send_request_packet(
_Objects_Get_node( region_id ),
&the_packet->Prefix,
- STATES_READY /* Not used */
+ STATES_READY, /* Not used */
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
index d94d908..f4c5cb7 100644
--- a/cpukit/rtems/src/semmp.c
+++ b/cpukit/rtems/src/semmp.c
@@ -95,7 +95,8 @@ rtems_status_code _Semaphore_MP_Send_request_packet (
return _MPCI_Send_request_packet(
_Objects_Get_node( semaphore_id ),
&the_packet->Prefix,
- STATES_WAITING_FOR_SEMAPHORE
+ STATES_WAITING_FOR_SEMAPHORE,
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/rtems/src/signalmp.c b/cpukit/rtems/src/signalmp.c
index 9d2177d..4a2d573 100644
--- a/cpukit/rtems/src/signalmp.c
+++ b/cpukit/rtems/src/signalmp.c
@@ -60,7 +60,8 @@ rtems_status_code _Signal_MP_Send_request_packet (
return _MPCI_Send_request_packet(
_Objects_Get_node( task_id ),
&the_packet->Prefix,
- STATES_READY /* Not used */
+ STATES_READY, /* Not used */
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
index 4b97ffe..339544c 100644
--- a/cpukit/rtems/src/taskmp.c
+++ b/cpukit/rtems/src/taskmp.c
@@ -108,7 +108,8 @@ rtems_status_code _RTEMS_tasks_MP_Send_request_packet (
return _MPCI_Send_request_packet(
_Objects_Get_node( task_id ),
&the_packet->Prefix,
- STATES_READY /* Not used */
+ STATES_READY, /* Not used */
+ RTEMS_TIMEOUT
);
break;
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h
index fac9f68..3e1d481 100644
--- a/cpukit/score/include/rtems/score/coresemimpl.h
+++ b/cpukit/score/include/rtems/score/coresemimpl.h
@@ -248,6 +248,7 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable(
executing,
STATES_WAITING_FOR_SEMAPHORE,
timeout,
+ CORE_SEMAPHORE_TIMEOUT,
lock_context
);
_Thread_Enable_dispatch();
diff --git a/cpukit/score/include/rtems/score/mpciimpl.h b/cpukit/score/include/rtems/score/mpciimpl.h
index 22dff88..5652f6a 100644
--- a/cpukit/score/include/rtems/score/mpciimpl.h
+++ b/cpukit/score/include/rtems/score/mpciimpl.h
@@ -189,13 +189,15 @@ void _MPCI_Send_process_packet (
* set in addition to the remote operation pending state. It
* may indicate the caller is blocking on a message queue
* operation.
+ * @param[in] timeout_code is the timeout code
*
* @retval This method returns the operation status from the remote node.
*/
uint32_t _MPCI_Send_request_packet (
uint32_t destination,
MP_packet_Prefix *the_packet,
- States_Control extra_state
+ States_Control extra_state,
+ uint32_t timeout_code
);
/**
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index b891986..4a8db7c 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -194,11 +194,6 @@ struct Thread_queue_Control {
* _Thread_queue_Release().
*/
ISR_LOCK_MEMBER( Lock )
-
- /** This is the status value returned to threads which timeout while
- * waiting on this thread queue.
- */
- uint32_t timeout_status;
};
/**@}*/
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
index 9893aae..79fc810 100644
--- a/cpukit/score/include/rtems/score/threadqimpl.h
+++ b/cpukit/score/include/rtems/score/threadqimpl.h
@@ -134,6 +134,7 @@ Thread_Control *_Thread_queue_Dequeue(
* @param[in] state The new state of the thread.
* @param[in] timeout Interval to wait. Use WATCHDOG_NO_TIMEOUT to block
* potentially forever.
+ * @param[in] timeout_code The return code in case a timeout occurs.
* @param[in] lock_context The lock context of the lock acquire.
*/
void _Thread_queue_Enqueue_critical(
@@ -141,6 +142,7 @@ void _Thread_queue_Enqueue_critical(
Thread_Control *the_thread,
States_Control state,
Watchdog_Interval timeout,
+ uint32_t timeout_code,
ISR_lock_Context *lock_context
);
@@ -152,7 +154,8 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Enqueue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
States_Control state,
- Watchdog_Interval timeout
+ Watchdog_Interval timeout,
+ uint32_t timeout_code
)
{
ISR_lock_Context lock_context;
@@ -163,6 +166,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Enqueue(
the_thread,
state,
timeout,
+ timeout_code,
&lock_context
);
}
@@ -332,12 +336,10 @@ 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] timeout_status is the return on a timeout
*/
void _Thread_queue_Initialize(
- Thread_queue_Control *the_thread_queue,
- Thread_queue_Disciplines the_discipline,
- uint32_t timeout_status
+ Thread_queue_Control *the_thread_queue,
+ Thread_queue_Disciplines the_discipline
);
RTEMS_INLINE_ROUTINE void _Thread_queue_Destroy(
diff --git a/cpukit/score/src/corebarrier.c b/cpukit/score/src/corebarrier.c
index 2035961..eddf901 100644
--- a/cpukit/score/src/corebarrier.c
+++ b/cpukit/score/src/corebarrier.c
@@ -32,7 +32,6 @@ void _CORE_barrier_Initialize(
_Thread_queue_Initialize(
&the_barrier->Wait_queue,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- CORE_BARRIER_TIMEOUT
+ THREAD_QUEUE_DISCIPLINE_FIFO
);
}
diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c
index 30abf0c..39687d3 100644
--- a/cpukit/score/src/corebarrierwait.c
+++ b/cpukit/score/src/corebarrierwait.c
@@ -54,6 +54,7 @@ void _CORE_barrier_Wait(
executing,
STATES_WAITING_FOR_BARRIER,
timeout,
+ CORE_BARRIER_TIMEOUT,
&lock_context
);
}
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c
index 0790221..ae2bc75 100644
--- a/cpukit/score/src/coremsg.c
+++ b/cpukit/score/src/coremsg.c
@@ -111,8 +111,7 @@ bool _CORE_message_queue_Initialize(
_Thread_queue_Initialize(
&the_message_queue->Wait_queue,
_CORE_message_queue_Is_priority( the_message_queue_attributes ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
+ THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO
);
return true;
diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c
index 45105ca..ec6cf8c 100644
--- a/cpukit/score/src/coremsgseize.c
+++ b/cpukit/score/src/coremsgseize.c
@@ -124,6 +124,7 @@ void _CORE_message_queue_Seize(
executing,
STATES_WAITING_FOR_MESSAGE,
timeout,
+ CORE_MESSAGE_QUEUE_STATUS_TIMEOUT,
&lock_context
);
}
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 0bcebe0..0d0965f 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -129,7 +129,8 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
&the_message_queue->Wait_queue,
executing,
STATES_WAITING_FOR_MESSAGE,
- timeout
+ timeout,
+ CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
}
diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c
index b5e8a5e..2f584f2 100644
--- a/cpukit/score/src/coremutex.c
+++ b/cpukit/score/src/coremutex.c
@@ -83,8 +83,7 @@ CORE_mutex_Status _CORE_mutex_Initialize(
_Thread_queue_Initialize(
&the_mutex->Wait_queue,
_CORE_mutex_Is_fifo( the_mutex_attributes ) ?
- THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
- CORE_MUTEX_TIMEOUT
+ THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
index 67954b6..4ecb702 100644
--- a/cpukit/score/src/coremutexseize.c
+++ b/cpukit/score/src/coremutexseize.c
@@ -81,6 +81,7 @@ void _CORE_mutex_Seize_interrupt_blocking(
executing,
STATES_WAITING_FOR_MUTEX,
timeout,
+ CORE_MUTEX_TIMEOUT,
lock_context
);
diff --git a/cpukit/score/src/corerwlock.c b/cpukit/score/src/corerwlock.c
index 0d47db4..8b74c41 100644
--- a/cpukit/score/src/corerwlock.c
+++ b/cpukit/score/src/corerwlock.c
@@ -36,7 +36,6 @@ void _CORE_RWLock_Initialize(
_Thread_queue_Initialize(
&the_rwlock->Wait_queue,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- CORE_RWLOCK_TIMEOUT
+ THREAD_QUEUE_DISCIPLINE_FIFO
);
}
diff --git a/cpukit/score/src/corerwlockobtainread.c b/cpukit/score/src/corerwlockobtainread.c
index 59c1097..0dea50f 100644
--- a/cpukit/score/src/corerwlockobtainread.c
+++ b/cpukit/score/src/corerwlockobtainread.c
@@ -87,6 +87,7 @@ void _CORE_RWLock_Obtain_for_reading(
executing,
STATES_WAITING_FOR_RWLOCK,
timeout,
+ CORE_RWLOCK_TIMEOUT,
&lock_context
);
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c
index 409d31a..76dfae2 100644
--- a/cpukit/score/src/corerwlockobtainwrite.c
+++ b/cpukit/score/src/corerwlockobtainwrite.c
@@ -77,6 +77,7 @@ void _CORE_RWLock_Obtain_for_writing(
executing,
STATES_WAITING_FOR_RWLOCK,
timeout,
+ CORE_RWLOCK_TIMEOUT,
&lock_context
);
diff --git a/cpukit/score/src/coresem.c b/cpukit/score/src/coresem.c
index eb1ba7e..2475c34 100644
--- a/cpukit/score/src/coresem.c
+++ b/cpukit/score/src/coresem.c
@@ -33,7 +33,6 @@ void _CORE_semaphore_Initialize(
_Thread_queue_Initialize(
&the_semaphore->Wait_queue,
_CORE_semaphore_Is_priority( the_semaphore_attributes ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- CORE_SEMAPHORE_TIMEOUT
+ THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO
);
}
diff --git a/cpukit/score/src/coresemseize.c b/cpukit/score/src/coresemseize.c
index d7ab28e..6ecf2c4 100644
--- a/cpukit/score/src/coresemseize.c
+++ b/cpukit/score/src/coresemseize.c
@@ -65,6 +65,7 @@ void _CORE_semaphore_Seize(
executing,
STATES_WAITING_FOR_SEMAPHORE,
timeout,
+ CORE_SEMAPHORE_TIMEOUT,
&lock_context
);
}
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 9915aa2..7fd77f7 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -82,8 +82,7 @@ void _MPCI_Handler_initialization(
_Thread_queue_Initialize(
&_MPCI_Remote_blocked_threads,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- timeout_status
+ THREAD_QUEUE_DISCIPLINE_FIFO
);
}
@@ -188,7 +187,8 @@ void _MPCI_Send_process_packet (
uint32_t _MPCI_Send_request_packet (
uint32_t destination,
MP_packet_Prefix *the_packet,
- States_Control extra_state
+ States_Control extra_state,
+ uint32_t timeout_code
)
{
Thread_Control *executing = _Thread_Executing;
@@ -217,7 +217,8 @@ uint32_t _MPCI_Send_request_packet (
&_MPCI_Remote_blocked_threads,
executing,
STATES_WAITING_FOR_RPC_REPLY | extra_state,
- the_packet->timeout
+ the_packet->timeout,
+ timeout_code
);
_Thread_Enable_dispatch();
diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c
index cdb9949..3b1b47b 100644
--- a/cpukit/score/src/threadq.c
+++ b/cpukit/score/src/threadq.c
@@ -44,15 +44,12 @@ RBTree_Compare_result _Thread_queue_Compare_priority(
}
void _Thread_queue_Initialize(
- Thread_queue_Control *the_thread_queue,
- Thread_queue_Disciplines the_discipline,
- uint32_t timeout_status
+ Thread_queue_Control *the_thread_queue,
+ Thread_queue_Disciplines the_discipline
)
{
const Thread_queue_Operations *operations;
- the_thread_queue->timeout_status = timeout_status;
-
_ISR_lock_Initialize( &the_thread_queue->Lock, "Thread Queue" );
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index d02f2ee..7145525 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -50,6 +50,7 @@ void _Thread_queue_Enqueue_critical(
Thread_Control *the_thread,
States_Control state,
Watchdog_Interval timeout,
+ uint32_t timeout_code,
ISR_lock_Context *lock_context
)
{
@@ -83,10 +84,7 @@ void _Thread_queue_Enqueue_critical(
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout != WATCHDOG_NO_TIMEOUT ) {
- _Thread_Wait_set_timeout_code(
- the_thread,
- the_thread_queue->timeout_status
- );
+ _Thread_Wait_set_timeout_code( the_thread, timeout_code );
_Watchdog_Initialize( &the_thread->Timer, _Thread_Timeout, 0, the_thread );
_Watchdog_Insert_ticks( &the_thread->Timer, timeout );
}
More information about the vc
mailing list