[rtems commit] score: Remove unused _Thread_queue_Dequeue()

Sebastian Huber sebh at rtems.org
Tue Apr 20 05:02:20 UTC 2021


Module:    rtems
Branch:    master
Commit:    0e49372ace6bc0c6773431c0b809b957d046b5ee
Changeset: http://git.rtems.org/rtems/commit/?id=0e49372ace6bc0c6773431c0b809b957d046b5ee

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Apr 19 20:06:27 2021 +0200

score: Remove unused _Thread_queue_Dequeue()

Last use was removed by:

commit 54550e048d3a49435912797d2024f80671e93267
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:   Fri May 13 08:16:30 2016 +0200

    posix: Rework pthread_join()

    Rework pthread_join() to use _Thread_Join().

---

 cpukit/include/rtems/score/threadqimpl.h | 51 --------------------------------
 cpukit/score/src/threadqenqueue.c        | 32 --------------------
 2 files changed, 83 deletions(-)

diff --git a/cpukit/include/rtems/score/threadqimpl.h b/cpukit/include/rtems/score/threadqimpl.h
index 88aba49..ca59de9 100644
--- a/cpukit/include/rtems/score/threadqimpl.h
+++ b/cpukit/include/rtems/score/threadqimpl.h
@@ -794,57 +794,6 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Release(
 #endif
 
 /**
- * @brief Dequeues the first thread waiting on the thread queue and returns it.
- *
- * @param the_thread_queue The thread queue for the operation.
- * @param operations The thread queue operations.
- *
- * @return The first locked thread.
- */
-Thread_Control *_Thread_queue_Do_dequeue(
-  Thread_queue_Control          *the_thread_queue,
-  const Thread_queue_Operations *operations
-#if defined(RTEMS_MULTIPROCESSING)
-  ,
-  Thread_queue_MP_callout        mp_callout
-#endif
-);
-
-/**
- *  @brief Gets a pointer to a thread waiting on the_thread_queue.
- *
- *  This function returns a pointer to a thread waiting on
- *  the_thread_queue.  The selection of this thread is based on
- *  the discipline of the_thread_queue.  If no threads are waiting
- *  on the_thread_queue, then NULL is returned.
- *
- *  - INTERRUPT LATENCY:
- *    + single case
- */
-#if defined(RTEMS_MULTIPROCESSING)
-  #define _Thread_queue_Dequeue( \
-    the_thread_queue, \
-    operations, \
-    mp_callout \
-  ) \
-    _Thread_queue_Do_dequeue( \
-      the_thread_queue, \
-      operations, \
-      mp_callout \
-    )
-#else
-  #define _Thread_queue_Dequeue( \
-    the_thread_queue, \
-    operations, \
-    mp_callout \
-  ) \
-    _Thread_queue_Do_dequeue( \
-      the_thread_queue, \
-      operations \
-    )
-#endif
-
-/**
  * @brief Blocks the thread and places it on the thread queue.
  *
  * This enqueues the thread on the thread queue, blocks the thread, and
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index ba31b13..5e228b7 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -746,38 +746,6 @@ void _Thread_queue_Surrender_sticky(
 }
 #endif
 
-Thread_Control *_Thread_queue_Do_dequeue(
-  Thread_queue_Control          *the_thread_queue,
-  const Thread_queue_Operations *operations
-#if defined(RTEMS_MULTIPROCESSING)
-  ,
-  Thread_queue_MP_callout        mp_callout
-#endif
-)
-{
-  Thread_queue_Context  queue_context;
-  Thread_Control       *the_thread;
-
-  _Thread_queue_Context_initialize( &queue_context );
-  _Thread_queue_Context_set_MP_callout( &queue_context, mp_callout );
-  _Thread_queue_Acquire( the_thread_queue, &queue_context );
-
-  the_thread = _Thread_queue_First_locked( the_thread_queue, operations );
-
-  if ( the_thread != NULL ) {
-    _Thread_queue_Extract_critical(
-      &the_thread_queue->Queue,
-      operations,
-      the_thread,
-      &queue_context
-    );
-  } else {
-    _Thread_queue_Release( the_thread_queue, &queue_context );
-  }
-
-  return the_thread;
-}
-
 #if defined(RTEMS_MULTIPROCESSING)
 void _Thread_queue_Unblock_proxy(
   Thread_queue_Queue *queue,



More information about the vc mailing list