Doubt in importance of SCHEDULER_PRIORITY_APPEND

Richi Dubey richidubey at gmail.com
Wed Jan 20 07:50:31 UTC 2021


Appending an item to its priority group means adding the item to the end of
the priority queue of items with the same priority, but when/why do we do
this? Do all classic tasks have their SCHEDULER_PRIORITY_APPEND_FLAG set to
1?

On Mon, Jan 18, 2021 at 12:39 PM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 18/01/2021 07:30, Richi Dubey wrote:
>
> > Hi,
> >
> > Can someone please explain to me why we add 1 to the priority
> > in SCHEDULER_PRIORITY_APPEND?
> >
> > /**
> >  * @brief Returns the priority control with the append indicator bit set.
> >  */
> > #define SCHEDULER_PRIORITY_APPEND( priority )  \
> >   ( ( priority ) | SCHEDULER_PRIORITY_APPEND_FLAG )
> >
> > What's the reason behind doing this and what do we achieve by this?
> /**
>   * @brief Returns true, if the item should be appended to its priority
> group,
>   * otherwise returns false and the item should be prepended to its
> priority
>   * group.
>   */
> #define SCHEDULER_PRIORITY_IS_APPEND( priority ) \
>    ( ( ( priority ) & SCHEDULER_PRIORITY_APPEND_FLAG ) != 0 )
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210120/3b95d17c/attachment.html>


More information about the devel mailing list