[PATCH] score: Remove unused _Thread_queue_Dequeue()

Gedare Bloom gedare at rtems.org
Mon Apr 19 19:12:27 UTC 2021


OK. Interesting, was this previously used and something changed?

On Mon, Apr 19, 2021 at 12:08 PM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> ---
>  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 88aba49a68..ca59de9e31 100644
> --- a/cpukit/include/rtems/score/threadqimpl.h
> +++ b/cpukit/include/rtems/score/threadqimpl.h
> @@ -793,57 +793,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.
>   *
> diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
> index ba31b13dd1..5e228b7190 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,
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list