summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score')
-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
19 files changed, 33 insertions, 35 deletions
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 );
}