[PATCH 20/45] score: More thread queue operations

Gedare Bloom gedare at rtems.org
Sun May 17 11:23:53 UTC 2015


On Fri, May 15, 2015 at 7:41 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Move thread queue discipline specific operations into
> Thread_queue_Operations.  Use a separate node in the thread control
> block for the thread queue to make it independent of the scheduler data
> structures.
>
> Update #2273.
> ---
[...]
>  const Thread_queue_Operations _Thread_queue_Operations_default = {
> -  .priority_change = _Thread_queue_Do_nothing_priority_change
> +  .priority_change = _Thread_queue_Do_nothing_priority_change,
> +  .extract = _Thread_queue_Do_nothing_extract
>  };
>
Any reason not to set default values for the other operations? Or
explicitly to NULL?

>  const Thread_queue_Operations _Thread_queue_Operations_FIFO = {
> -  .priority_change = _Thread_queue_Do_nothing_priority_change
> +  .priority_change = _Thread_queue_Do_nothing_priority_change,
> +  .initialize = _Thread_queue_FIFO_initialize,
> +  .enqueue = _Thread_queue_FIFO_enqueue,
> +  .dequeue = _Thread_queue_FIFO_dequeue,
> +  .extract = _Thread_queue_FIFO_extract,
> +  .first = _Thread_queue_FIFO_first
>  };
>
>  const Thread_queue_Operations _Thread_queue_Operations_priority = {
> -  .priority_change = _Thread_queue_Priority_priority_change
> +  .priority_change = _Thread_queue_Priority_priority_change,
> +  .initialize = _Thread_queue_Priority_initialize,
> +  .enqueue = _Thread_queue_Priority_enqueue,
> +  .dequeue = _Thread_queue_Priority_dequeue,
> +  .extract = _Thread_queue_Priority_extract,
> +  .first = _Thread_queue_Priority_first
>  };
Would it make sense to separate the _Thread_queue_Priority operations
to their own file?



More information about the devel mailing list