<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 30, 2018 at 11:29 AM, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jul 30, 2018 at 11:23 AM, Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br>
><br>
><br>
> On Mon, Jul 30, 2018 at 7:43 AM, Sebastian Huber<br>
> <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a>> wrote:<br>
>><br>
>> On 30/07/18 14:25, Joel Sherrill wrote:<br>
>>><br>
>>><br>
>>><br>
>>> On Mon, Jul 30, 2018, 6:26 AM Sebastian Huber<br>
>>> <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a><br>
>>> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@<wbr>embedded-brains.de</a>>> wrote:<br>
>>><br>
>>> Hello,<br>
>>><br>
>>> is there a standard API to convert priorities to/from POSIX from/to<br>
>>> Classic? If not, I think we should add something.<br>
>>><br>
>>><br>
>>> There is not a public API for this. There are some internal helpers<br>
>><br>
>><br>
>> Do you know the name of the helpers?<br>
><br>
><br>
> I was thinking of the _RTEMS_Priority_To_Core,<br>
> _RTEMS_Priority_From_core, and the similar<br>
> POSIX helper.<br>
><br>
> These are probably useful to some users. No real<br>
> cost to applications that don't use them.<br>
><br>
<br>
</span>These convert between the core kernel notion of priority and the api.<br>
I see no problem to add some wrappers like<br>
<br>
rtems_posix_priority_to_core() and from_core(), and<br>
rtems_priority_to_core(), and from_core().<br>
<br>
A user then could convert between the two APIs themselves if they need, like<br>
rtems_priority_from_core( rtems_posix_priority_to_core(<wbr>p) );<br>
<br>
I would not introduce any conversion between classic and posix<br>
priorities directly. It is violation of the API independence.<br></blockquote><div><br></div><div>In general, I don't disagree. But we don't promote out the idea of</div><div>using the core services either. Providing to/from core just results</div><div>in users writing code which does two conversions because we</div><div>didn't want to do it for them.</div><div><br></div><div>I think this is honestly just an edge case where the APIs do</div><div>often touch in a system and it might be helpful.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Gedare<br>
</font></span><span class="im HOEnZb"><br>
>><br>
>><br>
>><br>
>> --<br>
>> Sebastian Huber, embedded brains GmbH<br>
>><br>
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
>> Phone : +49 89 189 47 41-16<br>
>> Fax : +49 89 189 47 41-09<br>
>> E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a><br>
>> PGP : Public key available on request.<br>
>><br>
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
>><br>
><br>
><br>
</span><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br></div></div>