summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-27 16:25:52 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:46 +0200
commitf5d6c8b58daf82637bbcf7edb374f65227661a0c (patch)
treee48db841a19ae9d48e9374f4251c4980867362c1
parentcc366ec8c9ecaab838a745175a0d53a7a5db437e (diff)
downloadrtems-f5d6c8b58daf82637bbcf7edb374f65227661a0c.tar.bz2
score: Delete Thread_queue_Control::timeout_status
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
-rw-r--r--cpukit/posix/src/condinit.c3
-rw-r--r--cpukit/posix/src/condwaitsupp.c3
-rw-r--r--cpukit/posix/src/psignal.c3
-rw-r--r--cpukit/posix/src/pthread.c6
-rw-r--r--cpukit/posix/src/pthreadjoin.c3
-rw-r--r--cpukit/posix/src/sigtimedwait.c1
-rw-r--r--cpukit/rtems/src/eventmp.c3
-rw-r--r--cpukit/rtems/src/msgmp.c6
-rw-r--r--cpukit/rtems/src/partmp.c3
-rw-r--r--cpukit/rtems/src/regioncreate.c3
-rw-r--r--cpukit/rtems/src/regiongetsegment.c3
-rw-r--r--cpukit/rtems/src/regionmp.c3
-rw-r--r--cpukit/rtems/src/semmp.c3
-rw-r--r--cpukit/rtems/src/signalmp.c3
-rw-r--r--cpukit/rtems/src/taskmp.c3
-rw-r--r--cpukit/score/include/rtems/score/coresemimpl.h1
-rw-r--r--cpukit/score/include/rtems/score/mpciimpl.h4
-rw-r--r--cpukit/score/include/rtems/score/threadq.h5
-rw-r--r--cpukit/score/include/rtems/score/threadqimpl.h12
-rw-r--r--cpukit/score/src/corebarrier.c3
-rw-r--r--cpukit/score/src/corebarrierwait.c1
-rw-r--r--cpukit/score/src/coremsg.c3
-rw-r--r--cpukit/score/src/coremsgseize.c1
-rw-r--r--cpukit/score/src/coremsgsubmit.c3
-rw-r--r--cpukit/score/src/coremutex.c3
-rw-r--r--cpukit/score/src/coremutexseize.c1
-rw-r--r--cpukit/score/src/corerwlock.c3
-rw-r--r--cpukit/score/src/corerwlockobtainread.c1
-rw-r--r--cpukit/score/src/corerwlockobtainwrite.c1
-rw-r--r--cpukit/score/src/coresem.c3
-rw-r--r--cpukit/score/src/coresemseize.c1
-rw-r--r--cpukit/score/src/mpci.c9
-rw-r--r--cpukit/score/src/threadq.c7
-rw-r--r--cpukit/score/src/threadqenqueue.c6
34 files changed, 60 insertions, 57 deletions
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index c1c14b8bf9..0b61d14cb9 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 8a9e23540c..5a71dc3b54 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 543b558eac..3ca0723860 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 2817891ac5..a3a73f117a 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 48fb7d58df..f7361310c4 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 e988761453..fb8a243a0a 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 b2a5ce8a72..e2e43fcd0d 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 ddad64a17a..83b5a31f52 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 f41fd227e9..9593ce58a9 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 aa95f3231b..409510c892 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 cef90e79f3..1e5c795697 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 8bce822193..135a69dd97 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 d94d90870a..f4c5cb73df 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 9d2177d214..4a2d5738af 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 4b97ffe639..339544cdc4 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 fac9f689e4..3e1d481ab8 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 22dff883a2..5652f6afa1 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 b89198608a..4a8db7c59d 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 9893aae8af..79fc810b9b 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 2035961b92..eddf901934 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 30abf0c17a..39687d31da 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 0790221eb9..ae2bc753c7 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 45105ca19b..ec6cf8c52e 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 0bcebe04af..0d0965ffbf 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 b5e8a5ed4b..2f584f2abf 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 67954b697b..4ecb702305 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 0d47db4b23..8b74c4119c 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 59c1097354..0dea50f1e8 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 409d31aeec..76dfae2776 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 eb1ba7e283..2475c349a7 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 d7ab28e779..6ecf2c4c8f 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 9915aa2d12..7fd77f7597 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 cdb99498fe..3b1b47bf3a 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 d02f2ee073..714552509e 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 );
}