summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 13:01:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:42 +0200
commit22788bc2baeb8e13bb0d6b6d05782a6ccfd4cb67 (patch)
treebbb9169de2cf7282bb44cf6374a71b41aec8137c /cpukit/score
parentscore: Add _SMP_Assert() (diff)
downloadrtems-22788bc2baeb8e13bb0d6b6d05782a6ccfd4cb67.tar.bz2
score: _Thread_queue_Extract()
Remove thread queue parameter from _Thread_queue_Extract() since the current thread queue is stored in the thread control block.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/threadqimpl.h16
-rw-r--r--cpukit/score/src/corerwlockrelease.c2
-rw-r--r--cpukit/score/src/mpci.c2
-rw-r--r--cpukit/score/src/threadqenqueue.c14
-rw-r--r--cpukit/score/src/threadqextractwithproxy.c7
-rw-r--r--cpukit/score/src/threadqprocesstimeout.c1
6 files changed, 14 insertions, 28 deletions
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
index 6eac3643f4..6fc38cfa5b 100644
--- a/cpukit/score/include/rtems/score/threadqimpl.h
+++ b/cpukit/score/include/rtems/score/threadqimpl.h
@@ -78,25 +78,20 @@ void _Thread_queue_Enqueue(
/**
* @brief Extracts thread from thread queue.
*
- * This routine removes @a the_thread from @a the_thread_queue
+ * This routine removes @a the_thread its thread queue
* and cancels any timeouts associated with this blocking.
*
- * @param[in] the_thread_queue is the pointer to the ThreadQ header
* @param[in] the_thread is the pointer to a thread control block that
* is to be removed
*/
-void _Thread_queue_Extract(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-);
+void _Thread_queue_Extract( Thread_Control *the_thread );
/**
* @brief Extracts thread from thread queue (w/return code).
*
- * This routine removes @a the_thread from @a the_thread_queue
+ * This routine removes @a the_thread its thread queue
* and cancels any timeouts associated with this blocking.
*
- * @param[in] the_thread_queue is the pointer to the ThreadQ header
* @param[in] the_thread is the pointer to a thread control block that
* is to be removed
* @param[in] return_code specifies the status to be returned.
@@ -105,9 +100,8 @@ void _Thread_queue_Extract(
* + single case
*/
void _Thread_queue_Extract_with_return_code(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread,
- uint32_t return_code
+ Thread_Control *the_thread,
+ uint32_t return_code
);
/**
diff --git a/cpukit/score/src/corerwlockrelease.c b/cpukit/score/src/corerwlockrelease.c
index efaf67d351..bd39213c87 100644
--- a/cpukit/score/src/corerwlockrelease.c
+++ b/cpukit/score/src/corerwlockrelease.c
@@ -87,7 +87,7 @@ CORE_RWLock_Status _CORE_RWLock_Release(
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
- _Thread_queue_Extract( &the_rwlock->Wait_queue, next );
+ _Thread_queue_Extract( next );
}
}
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 9b623b253f..424bcb4d33 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -262,7 +262,7 @@ Thread_Control *_MPCI_Process_response (
the_thread = NULL; /* IMPOSSIBLE */
break;
case OBJECTS_LOCAL:
- _Thread_queue_Extract( &_MPCI_Remote_blocked_threads, the_thread );
+ _Thread_queue_Extract( the_thread );
the_thread->Wait.return_code = the_packet->return_code;
_Objects_Put_without_thread_dispatch( &the_thread->Object );
break;
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index 5c237560f4..0e16f59c46 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -185,11 +185,11 @@ void _Thread_queue_Enqueue(
}
void _Thread_queue_Extract_with_return_code(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread,
- uint32_t return_code
+ Thread_Control *the_thread,
+ uint32_t return_code
)
{
+ Thread_queue_Control *the_thread_queue;
ISR_lock_Context lock_context;
_Thread_queue_Acquire( &lock_context );
@@ -199,6 +199,8 @@ void _Thread_queue_Extract_with_return_code(
return;
}
+ the_thread_queue = the_thread->Wait.queue;
+
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_FIFO ) {
_Chain_Extract_unprotected( &the_thread->Object.Node );
} else { /* must be THREAD_QUEUE_DISCIPLINE_PRIORITY */
@@ -220,13 +222,9 @@ void _Thread_queue_Extract_with_return_code(
_Thread_blocking_operation_Finalize( the_thread, &lock_context );
}
-void _Thread_queue_Extract(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-)
+void _Thread_queue_Extract( Thread_Control *the_thread )
{
_Thread_queue_Extract_with_return_code(
- the_thread_queue,
the_thread,
the_thread->Wait.return_code
);
diff --git a/cpukit/score/src/threadqextractwithproxy.c b/cpukit/score/src/threadqextractwithproxy.c
index fb06526e9e..72043a094d 100644
--- a/cpukit/score/src/threadqextractwithproxy.c
+++ b/cpukit/score/src/threadqextractwithproxy.c
@@ -31,8 +31,6 @@ void _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
- Thread_queue_Control *the_thread_queue;
-
#if defined(RTEMS_MULTIPROCESSING)
States_Control state;
@@ -50,8 +48,5 @@ void _Thread_queue_Extract_with_proxy(
}
#endif
- the_thread_queue = the_thread->Wait.queue;
- if ( the_thread_queue != NULL ) {
- _Thread_queue_Extract( the_thread_queue, the_thread );
- }
+ _Thread_queue_Extract( the_thread );
}
diff --git a/cpukit/score/src/threadqprocesstimeout.c b/cpukit/score/src/threadqprocesstimeout.c
index 616901900d..dbb8f5ce45 100644
--- a/cpukit/score/src/threadqprocesstimeout.c
+++ b/cpukit/score/src/threadqprocesstimeout.c
@@ -69,7 +69,6 @@ void _Thread_queue_Process_timeout(
* queue initialization.
*/
_Thread_queue_Extract_with_return_code(
- the_thread_queue,
the_thread,
the_thread_queue->timeout_status
);