<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 20, 2021 at 1:50 AM Richi Dubey <<a href="mailto:richidubey@gmail.com">richidubey@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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?</div></blockquote><div><br></div><div>There is (was) a specific case in the POSIX implementation that required the thread to be placed at the head of the list. Hopefully it is still there or all the Ada conformance tests will not pass. At least, that was where I encountered code that depended on that very precise behavior.</div><div><br></div><div>--joel </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 18, 2021 at 12:39 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 18/01/2021 07:30, Richi Dubey wrote:<br>
<br>
> Hi,<br>
><br>
> Can someone please explain to me why we add 1 to the priority <br>
> in SCHEDULER_PRIORITY_APPEND?<br>
><br>
> /**<br>
> * @brief Returns the priority control with the append indicator bit set.<br>
> */<br>
> #define SCHEDULER_PRIORITY_APPEND( priority ) \<br>
> ( ( priority ) | SCHEDULER_PRIORITY_APPEND_FLAG )<br>
><br>
> What's the reason behind doing this and what do we achieve by this?<br>
/**<br>
* @brief Returns true, if the item should be appended to its priority <br>
group,<br>
* otherwise returns false and the item should be prepended to its priority<br>
* group.<br>
*/<br>
#define SCHEDULER_PRIORITY_IS_APPEND( priority ) \<br>
( ( ( priority ) & SCHEDULER_PRIORITY_APPEND_FLAG ) != 0 )<br>
<br>
-- <br>
embedded brains GmbH<br>
Herr Sebastian HUBER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 16<br>
fax: +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
<br>
</blockquote></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>