[PATCH 15/16] score: Rename function threadq support function

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Oct 23 13:53:46 UTC 2017


Rename _Thread_queue_Context_set_do_nothing_enqueue_callout() into
_Thread_queue_Context_set_enqueue_do_nothing_extra().  More
_Thread_queue_Context_set_enqueue_*() functions will follow.

Update #3117.
Update #3182.
---
 cpukit/posix/src/mutexlocksupp.c               |  2 +-
 cpukit/posix/src/nanosleep.c                   |  5 +----
 cpukit/posix/src/pbarrierwait.c                |  2 +-
 cpukit/posix/src/pthreadjoin.c                 |  2 +-
 cpukit/posix/src/semtimedwait.c                |  2 +-
 cpukit/posix/src/sigtimedwait.c                |  2 +-
 cpukit/score/include/rtems/score/coresemimpl.h |  2 +-
 cpukit/score/include/rtems/score/threadq.h     |  2 +-
 cpukit/score/include/rtems/score/threadqimpl.h | 10 +++++-----
 cpukit/score/src/corebarrierwait.c             |  2 +-
 cpukit/score/src/coremsgseize.c                |  2 +-
 cpukit/score/src/coremsgsubmit.c               |  2 +-
 cpukit/score/src/coremutexseize.c              |  2 +-
 cpukit/score/src/corerwlockobtainread.c        |  2 +-
 cpukit/score/src/corerwlockobtainwrite.c       |  2 +-
 cpukit/score/src/futex.c                       |  2 +-
 cpukit/score/src/mutex.c                       |  2 +-
 cpukit/score/src/semaphore.c                   |  2 +-
 cpukit/score/src/threadqenqueue.c              |  2 +-
 19 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
index 507d667164..4b0f366629 100644
--- a/cpukit/posix/src/mutexlocksupp.c
+++ b/cpukit/posix/src/mutexlocksupp.c
@@ -34,7 +34,7 @@ Status_Control _POSIX_Mutex_Seize_slow(
       queue_context,
       STATES_WAITING_FOR_MUTEX
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
     _Thread_queue_Context_set_deadlock_callout(
       queue_context,
       _Thread_queue_Deadlock_status
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c
index b2c169373a..e8a7fe14c1 100644
--- a/cpukit/posix/src/nanosleep.c
+++ b/cpukit/posix/src/nanosleep.c
@@ -51,10 +51,7 @@ static inline int nanosleep_helper(
     &queue_context,
     STATES_WAITING_FOR_TIME | STATES_INTERRUPTIBLE_BY_SIGNAL
   );
-  _Thread_queue_Context_set_enqueue_callout(
-    &queue_context,
-    _Thread_queue_Enqueue_do_nothing
-  );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
 
   if ( discipline == WATCHDOG_ABSOLUTE ) {
     _Thread_queue_Context_set_absolute_timeout( &queue_context, ticks );
diff --git a/cpukit/posix/src/pbarrierwait.c b/cpukit/posix/src/pbarrierwait.c
index 9719112256..b9785216b4 100644
--- a/cpukit/posix/src/pbarrierwait.c
+++ b/cpukit/posix/src/pbarrierwait.c
@@ -53,7 +53,7 @@ int pthread_barrier_wait( pthread_barrier_t *_barrier )
       &queue_context,
       STATES_WAITING_FOR_BARRIER
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
     _Thread_queue_Context_set_no_timeout( &queue_context );
     _Thread_queue_Enqueue(
       &barrier->Queue.Queue,
diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c
index 12f49e55d8..b6981fd9b3 100644
--- a/cpukit/posix/src/pthreadjoin.c
+++ b/cpukit/posix/src/pthreadjoin.c
@@ -39,7 +39,7 @@ static int _POSIX_Threads_Join( pthread_t thread, void **value_ptr )
   void                 *value;
 
   _Thread_queue_Context_initialize( &queue_context );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
   _Thread_queue_Context_set_no_timeout( &queue_context );
   the_thread = _Thread_Get( thread, &queue_context.Lock_context.Lock_context );
 
diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c
index f00557c38d..90e6866341 100644
--- a/cpukit/posix/src/semtimedwait.c
+++ b/cpukit/posix/src/semtimedwait.c
@@ -72,7 +72,7 @@ int sem_timedwait(
       &queue_context,
       STATES_WAITING_FOR_SEMAPHORE
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
     _Thread_queue_Context_set_relative_timeout( &queue_context, ticks );
     _Thread_queue_Context_set_ISR_level( &queue_context, level );
     _Thread_queue_Enqueue(
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index f96c32ef45..70170bf2f7 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -160,7 +160,7 @@ int sigtimedwait(
     &queue_context,
     STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL
   );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
   _Thread_queue_Enqueue(
     &_POSIX_signals_Wait_queue.Queue,
     POSIX_SIGNALS_TQ_OPERATIONS,
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h
index 20ca30b366..aa053d7acd 100644
--- a/cpukit/score/include/rtems/score/coresemimpl.h
+++ b/cpukit/score/include/rtems/score/coresemimpl.h
@@ -188,7 +188,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_semaphore_Seize(
     queue_context,
     STATES_WAITING_FOR_SEMAPHORE
   );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
   _Thread_queue_Enqueue(
     &the_semaphore->Wait_queue.Queue,
     operations,
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index f6257ec207..c4742ba05c 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -204,7 +204,7 @@ struct Thread_queue_Context {
    * The callout is invoked after the release of the thread queue lock with
    * thread dispatching disabled.  Afterwards the thread is blocked.
    *
-   * @see _Thread_queue_Enqueue_do_nothing().
+   * @see _Thread_queue_Enqueue_do_nothing_extra().
    */
   Thread_queue_Enqueue_callout enqueue_callout;
 
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
index 60067076c7..f74db96129 100644
--- a/cpukit/score/include/rtems/score/threadqimpl.h
+++ b/cpukit/score/include/rtems/score/threadqimpl.h
@@ -62,7 +62,7 @@ typedef struct {
   Thread_queue_Queue Queue;
 } Thread_queue_Syslock_queue;
 
-void _Thread_queue_Enqueue_do_nothing(
+void _Thread_queue_Enqueue_do_nothing_extra(
   Thread_queue_Queue   *queue,
   Thread_Control       *the_thread,
   Thread_queue_Context *queue_context
@@ -142,11 +142,11 @@ _Thread_queue_Context_set_enqueue_callout(
  * @see _Thread_queue_Enqueue().
  */
 RTEMS_INLINE_ROUTINE void
-_Thread_queue_Context_set_do_nothing_enqueue_callout(
+_Thread_queue_Context_set_enqueue_do_nothing_extra(
   Thread_queue_Context *queue_context
 )
 {
-  queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing;
+  queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing_extra;
 }
 
 /**
@@ -615,7 +615,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
  * - _Thread_queue_Context_set_thread_state(),
  *
  * - _Thread_queue_Context_set_enqueue_callout() or
- *   _Thread_queue_Context_set_do_nothing_enqueue_callout(),
+ *   _Thread_queue_Context_set_enqueue_do_nothing_extra(),
  *
  * - _Thread_queue_Context_set_no_timeout() or
  *   _Thread_queue_Context_set_relative_timeout() or
@@ -651,7 +651,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
  *       &queue_context,
  *       STATES_WAITING_FOR_MUTEX
  *     );
- *     _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+ *     _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
  *     _Thread_queue_Context_set_no_timeout( &queue_context );
  *     _Thread_queue_Context_set_deadlock_callout(
  *       queue_context,
diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c
index f47c039e7b..5093e02bc0 100644
--- a/cpukit/score/src/corebarrierwait.c
+++ b/cpukit/score/src/corebarrierwait.c
@@ -48,7 +48,7 @@ Status_Control _CORE_barrier_Seize(
       queue_context,
       STATES_WAITING_FOR_BARRIER
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
     _Thread_queue_Enqueue(
       &the_barrier->Wait_queue.Queue,
       CORE_BARRIER_TQ_OPERATIONS,
diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c
index b48a3f93d7..5d0b95b9e5 100644
--- a/cpukit/score/src/coremsgseize.c
+++ b/cpukit/score/src/coremsgseize.c
@@ -117,7 +117,7 @@ Status_Control _CORE_message_queue_Seize(
     queue_context,
     STATES_WAITING_FOR_MESSAGE
   );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
   _Thread_queue_Enqueue(
     &the_message_queue->Wait_queue.Queue,
     the_message_queue->operations,
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 3c961014e3..6040f76eb3 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -135,7 +135,7 @@ Status_Control _CORE_message_queue_Submit(
       queue_context,
       STATES_WAITING_FOR_MESSAGE
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
     _Thread_queue_Enqueue(
       &the_message_queue->Wait_queue.Queue,
       the_message_queue->operations,
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
index 4309380627..173c495d3c 100644
--- a/cpukit/score/src/coremutexseize.c
+++ b/cpukit/score/src/coremutexseize.c
@@ -36,7 +36,7 @@ Status_Control _CORE_mutex_Seize_slow(
       queue_context,
       STATES_WAITING_FOR_MUTEX
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
     _Thread_queue_Context_set_deadlock_callout(
       queue_context,
       _Thread_queue_Deadlock_status
diff --git a/cpukit/score/src/corerwlockobtainread.c b/cpukit/score/src/corerwlockobtainread.c
index d0bd7b09ce..88853ebfb3 100644
--- a/cpukit/score/src/corerwlockobtainread.c
+++ b/cpukit/score/src/corerwlockobtainread.c
@@ -77,7 +77,7 @@ Status_Control _CORE_RWLock_Seize_for_reading(
     queue_context,
    STATES_WAITING_FOR_RWLOCK
   );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
   _Thread_queue_Enqueue(
      &the_rwlock->Queue.Queue,
      CORE_RWLOCK_TQ_OPERATIONS,
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c
index 6859163f1f..6145fc3c4c 100644
--- a/cpukit/score/src/corerwlockobtainwrite.c
+++ b/cpukit/score/src/corerwlockobtainwrite.c
@@ -71,7 +71,7 @@ Status_Control _CORE_RWLock_Seize_for_writing(
     queue_context,
     STATES_WAITING_FOR_RWLOCK
   );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
   _Thread_queue_Enqueue(
      &the_rwlock->Queue.Queue,
      CORE_RWLOCK_TQ_OPERATIONS,
diff --git a/cpukit/score/src/futex.c b/cpukit/score/src/futex.c
index 888eeda2f2..c5b4f197c3 100644
--- a/cpukit/score/src/futex.c
+++ b/cpukit/score/src/futex.c
@@ -94,7 +94,7 @@ int _Futex_Wait( struct _Futex_Control *_futex, int *uaddr, int val )
       &queue_context,
       STATES_WAITING_FOR_FUTEX
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
     _Thread_queue_Context_set_no_timeout( &queue_context );
     _Thread_queue_Context_set_ISR_level( &queue_context, level );
     _Thread_queue_Enqueue(
diff --git a/cpukit/score/src/mutex.c b/cpukit/score/src/mutex.c
index 2a116c4602..1c793ad633 100644
--- a/cpukit/score/src/mutex.c
+++ b/cpukit/score/src/mutex.c
@@ -102,7 +102,7 @@ static void _Mutex_Acquire_slow(
     queue_context,
     STATES_WAITING_FOR_MUTEX
   );
-  _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
+  _Thread_queue_Context_set_enqueue_do_nothing_extra( queue_context );
   _Thread_queue_Context_set_deadlock_callout(
     queue_context,
     _Thread_queue_Deadlock_fatal
diff --git a/cpukit/score/src/semaphore.c b/cpukit/score/src/semaphore.c
index e670367e86..a912fbc4d2 100644
--- a/cpukit/score/src/semaphore.c
+++ b/cpukit/score/src/semaphore.c
@@ -60,7 +60,7 @@ void _Semaphore_Wait( struct _Semaphore_Control *_sem )
       &queue_context,
       STATES_WAITING_FOR_SEMAPHORE
     );
-    _Thread_queue_Context_set_do_nothing_enqueue_callout( &queue_context );
+    _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context );
     _Thread_queue_Context_set_no_timeout( &queue_context );
     _Thread_queue_Context_set_ISR_level( &queue_context, level );
     _Thread_queue_Enqueue(
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index 41cd1e62ad..40fb69bbd3 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -356,7 +356,7 @@ bool _Thread_queue_Path_acquire_critical(
   return true;
 }
 
-void _Thread_queue_Enqueue_do_nothing(
+void _Thread_queue_Enqueue_do_nothing_extra(
   Thread_queue_Queue   *queue,
   Thread_Control       *the_thread,
   Thread_queue_Context *queue_context
-- 
2.12.3




More information about the devel mailing list