summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-22 10:53:03 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-23 12:52:06 +0100
commita4217c674d90de7bcf1af3583aab44fe0c90d2f1 (patch)
tree2357983e63885abeb7819fda837725b9edc65033 /cpukit/score/include/rtems
parentscore: Add thread queue enqueue callout (diff)
downloadrtems-a4217c674d90de7bcf1af3583aab44fe0c90d2f1.tar.bz2
score: Rename _Thread_queue_Enqueue_critical()
Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r--cpukit/score/include/rtems/score/coresemimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/thread.h2
-rw-r--r--cpukit/score/include/rtems/score/threadq.h4
-rw-r--r--cpukit/score/include/rtems/score/threadqimpl.h58
4 files changed, 14 insertions, 52 deletions
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h
index d097b3d76c..7f5b58e76b 100644
--- a/cpukit/score/include/rtems/score/coresemimpl.h
+++ b/cpukit/score/include/rtems/score/coresemimpl.h
@@ -185,7 +185,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_semaphore_Seize(
}
_Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
- _Thread_queue_Enqueue_critical(
+ _Thread_queue_Enqueue(
&the_semaphore->Wait_queue.Queue,
operations,
executing,
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 95b977e7ba..13765fc940 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -516,7 +516,7 @@ typedef struct {
/****************** end of common block ********************/
/**
- * @brief Thread queue callout for _Thread_queue_Enqueue_critical().
+ * @brief Thread queue callout for _Thread_queue_Enqueue().
*/
Thread_queue_MP_callout thread_queue_callout;
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index df03cfb96a..61ce5fbee2 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -193,7 +193,7 @@ struct Thread_queue_Context {
Thread_queue_Lock_context Lock_context;
/**
- * @brief The enqueue callout for _Thread_queue_Enqueue_critical().
+ * @brief The enqueue callout for _Thread_queue_Enqueue().
*
* The callout is invoked after the release of the thread queue lock with
* thread dispatching disabled. Afterwards the thread is blocked.
@@ -272,7 +272,7 @@ struct Thread_queue_Context {
/**
* @brief Invoked in case of a detected deadlock.
*
- * Must be initialized for _Thread_queue_Enqueue_critical() in case the
+ * Must be initialized for _Thread_queue_Enqueue() in case the
* thread queue may have an owner, e.g. for mutex objects.
*
* @see _Thread_queue_Context_set_deadlock_callout().
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
index 232e9601ac..6e3c044aed 100644
--- a/cpukit/score/include/rtems/score/threadqimpl.h
+++ b/cpukit/score/include/rtems/score/threadqimpl.h
@@ -101,7 +101,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_initialize(
* @param queue_context The thread queue context.
* @param enqueue_callout The enqueue callout.
*
- * @see _Thread_queue_Enqueue_critical().
+ * @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void
_Thread_queue_Context_set_enqueue_callout(
@@ -117,7 +117,7 @@ _Thread_queue_Context_set_enqueue_callout(
*
* @param queue_context The thread queue context.
*
- * @see _Thread_queue_Enqueue_critical().
+ * @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void
_Thread_queue_Context_set_do_nothing_enqueue_callout(
@@ -133,7 +133,7 @@ _Thread_queue_Context_set_do_nothing_enqueue_callout(
* @param queue_context The thread queue context.
* @param timeout The new timeout.
*
- * @see _Thread_queue_Enqueue_critical().
+ * @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void
_Thread_queue_Context_set_no_timeout(
@@ -149,7 +149,7 @@ _Thread_queue_Context_set_no_timeout(
* @param queue_context The thread queue context.
* @param discipline The clock discipline to use for the timeout.
*
- * @see _Thread_queue_Enqueue_critical().
+ * @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void
_Thread_queue_Context_set_relative_timeout(
@@ -167,7 +167,7 @@ _Thread_queue_Context_set_relative_timeout(
* @param queue_context The thread queue context.
* @param discipline The clock discipline to use for the timeout.
*
- * @see _Thread_queue_Enqueue_critical().
+ * @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void
_Thread_queue_Context_set_absolute_timeout(
@@ -183,7 +183,7 @@ _Thread_queue_Context_set_absolute_timeout(
* @brief Sets the deadlock callout in the thread queue
* context.
*
- * A deadlock callout must be provided for _Thread_queue_Enqueue_critical()
+ * A deadlock callout must be provided for _Thread_queue_Enqueue()
* operations that operate on thread queues which may have an owner, e.g. mutex
* objects. Available deadlock callouts are _Thread_queue_Deadlock_status()
* and _Thread_queue_Deadlock_fatal().
@@ -191,7 +191,7 @@ _Thread_queue_Context_set_absolute_timeout(
* @param queue_context The thread queue context.
* @param deadlock_callout The deadlock callout.
*
- * @see _Thread_queue_Enqueue_critical().
+ * @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_deadlock_callout(
Thread_queue_Context *queue_context,
@@ -555,7 +555,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
* complete. The operation to enqueue the thread on the queue is protected by
* the thread queue lock. This makes it possible to use the thread queue lock
* to protect the state of objects embedding the thread queue and directly
- * enter _Thread_queue_Enqueue_critical() in case the thread must block.
+ * enter _Thread_queue_Enqueue() in case the thread must block.
*
* @code
* #include <rtems/score/threadqimpl.h>
@@ -583,7 +583,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
* _Thread_queue_Release( &mutex->Queue, queue_context );
* } else {
* _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
- * _Thread_queue_Enqueue_critical(
+ * _Thread_queue_Enqueue(
* &mutex->Queue.Queue,
* MUTEX_TQ_OPERATIONS,
* executing,
@@ -601,7 +601,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
* @param[in] state The new state of the thread.
* @param[in] queue_context The thread queue context of the lock acquire.
*/
-void _Thread_queue_Enqueue_critical(
+void _Thread_queue_Enqueue(
Thread_queue_Queue *queue,
const Thread_queue_Operations *operations,
Thread_Control *the_thread,
@@ -641,44 +641,6 @@ Status_Control _Thread_queue_Enqueue_sticky(
#endif
/**
- * @brief Acquires the thread queue lock and calls
- * _Thread_queue_Enqueue_critical().
- */
-RTEMS_INLINE_ROUTINE void _Thread_queue_Enqueue(
- Thread_queue_Control *the_thread_queue,
- const Thread_queue_Operations *operations,
- Thread_Control *the_thread,
- States_Control state,
- uint64_t timeout,
- Watchdog_Discipline discipline,
- uint32_t expected_level
-)
-{
- Thread_queue_Context queue_context;
-
- _Thread_queue_Context_initialize( &queue_context );
- _Thread_queue_Acquire( the_thread_queue, &queue_context );
- _Thread_queue_Context_set_enqueue_callout(
- &queue_context,
- _Thread_queue_Enqueue_do_nothing
- );
-
- if ( discipline == WATCHDOG_ABSOLUTE ) {
- _Thread_queue_Context_set_absolute_timeout( &queue_context, timeout );
- } else {
- _Thread_queue_Context_set_relative_timeout( &queue_context, timeout );
- }
-
- _Thread_queue_Enqueue_critical(
- &the_thread_queue->Queue,
- operations,
- the_thread,
- state,
- &queue_context
- );
-}
-
-/**
* @brief Extracts the thread from the thread queue, restores the default wait
* operations and restores the default thread lock.
*