<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 21, 2021 at 2:28 AM Matthew Joyce <<a href="mailto:mfjoyce2004@gmail.com">mfjoyce2004@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">Gentlemen,<br>
<br>
Awesome, thanks! I see how that works now...I'll give it a thorough<br>
look tomorrow and will update the spreadsheet accordingly. I'll pipe<br>
back up when I have a more accurate look of what's currently there.<br></blockquote><div><br></div><div>Knowing what doesn't have to be done is the first step. (rtems, newlib, and libbsd)</div><div><br></div><div>I'd be prone to look for things that are easy to add first.</div><div><br></div><div>Some may not be implementable on RTEMS due to only supporting a</div><div>single process and no virtual memory. If you have doubts on whether it</div><div>is possible to support a specific method, speak up and let's try to decide.</div><div><br></div><div>Then find upstream places for an implementation where possible. I suspect</div><div>all the new "clock" methods will require discussion on an implementation </div><div>pattern but those must strictly be added to rtems/cpukit with tests and </div><div>documentation. At least I can throw you that much. :)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks again and have a great Sunday!<br>
<br>
Matt<br>
<br>
On Fri, Mar 19, 2021 at 8:27 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
><br>
><br>
><br>
> On Fri, Mar 19, 2021 at 1:08 PM Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>> wrote:<br>
>><br>
>> On Fri, Mar 19, 2021 at 11:16 AM Matthew Joyce <<a href="mailto:mfjoyce2004@gmail.com" target="_blank">mfjoyce2004@gmail.com</a>> wrote:<br>
>> ><br>
>> > Dr. Joel,<br>
>> ><br>
>> > Thanks very much...I'll keep working to get a sense of what goes<br>
>> > where! In the meantime, where can I look to get the ground truth of<br>
>> > which methods are "in RTEMS" as opposed to those in newlib?<br>
>> ><br>
>> There is only one ground truth:<br>
>> git://<a href="http://git.rtems.org/rtems.git" rel="noreferrer" target="_blank">git.rtems.org/rtems.git</a><br>
>><br>
>> And for newlib<br>
>><br>
>> git://<a href="http://sourceware.org/git/newlib-cygwin.git" rel="noreferrer" target="_blank">sourceware.org/git/newlib-cygwin.git</a><br>
>><br>
>> That said, searching for the function name symbols in compiled<br>
>> libraries is a good first step to rule out newlib. Then, you can<br>
>> 'grep' the RTEMS source code for the function names to see if they<br>
>> exist there.<br>
><br>
><br>
> rtems/cpukit to be specitic. It won't be implemented anywhere else.<br>
><br>
> And clearly we both have forgotten that networking APIs are in the<br>
> rtems-libbsd repository.<br>
><br>
> <a href="https://git.rtems.org/rtems-libbsd/" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-libbsd/</a><br>
><br>
> I suspect ppoll() might already be in there. Or at least supported by<br>
> FreeBSD.<br>
><br>
> You should clone everything and grep the sources. newlib already has<br>
> qsort_r. This is the nm I used:<br>
><br>
> $ ~/rtems-work/tools/6/bin/sparc-rtems6-nm ~/rtems-work/tools/6/sparc-rtems6/lib/libc.a | grep qsort_r<br>
> lib_a-bsd_qsort_r.o:<br>
> 00000000 T __bsd_qsort_r<br>
> lib_a-qsort_r.o:<br>
> 00000000 T qsort_r<br>
><br>
> Notice the last line has "T qsort_r" which says it is defined.<br>
><br>
> grep -r in the newlib source shows it is in ./libc/search/qsort_r.c<br>
><br>
> dladdr() looks to be prototyped in RTEMS but hidden behind an ifdef like it<br>
> wasn't ported from NetBSD so that looks possible. It is in rtems.<br>
><br>
> Those two examples should help you figure out why you missed<br>
> finding some things that were implemented.<br>
><br>
> I need to figure out what this next POSIX version is to be called<br>
> so I can update the tracking spreadsheet that generates the RTEMS<br>
> POSIX Compliance Guide, :)<br>
><br>
> --joel<br>
>><br>
>><br>
>> > Thanks again!<br>
>> ><br>
>> > Matt<br>
>> ><br>
>> > On Fri, Mar 19, 2021 at 1:58 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
>> > ><br>
>> > > Keep devel@ on the list. :)<br>
>> > ><br>
>> > > On Fri, Mar 19, 2021 at 7:51 AM Matthew Joyce <<a href="mailto:mfjoyce2004@gmail.com" target="_blank">mfjoyce2004@gmail.com</a>> wrote:<br>
>> > >><br>
>> > >> Sir,<br>
>> > >><br>
>> > >> Thank you for the link! I see that you're right, those last four are<br>
>> > >> in newlib, plus memmem(). I updated those in the Google Sheet.<br>
>> > >><br>
>> > >> Now I see the newlib part, but where are you referring to specifically<br>
>> > >> when you say RTEMS, as in "POSIX support comes from a mix of RTEMS and<br>
>> > >> newlib"?<br>
>> > ><br>
>> > ><br>
>> > > POSIX is a HUGE HUGE standard and references other standards. One<br>
>> > > it references and pulls in is the C99 Standard C Library which is libc and<br>
>> > > libm. RTEMS mostly does not implement this functionality and relies on<br>
>> > > another open source project for those APIs. Newlib is an open source<br>
>> > > C Library used by RTEMS, Cygwin, and most embedded systems GNU tools<br>
>> > > chains.<br>
>> > ><br>
>> > > Most of the POSIX header files with RTEMS are actually in Newlib even<br>
>> > > if they originated with RTEMS. Many are shared with Cygwin.<br>
>> > ><br>
>> > > So methods like the string, memory, and *printf come from Newlib since they<br>
>> > > are in C99. We provide POSIX like threading, signals, core file access, and<br>
>> > > much more.<br>
>> > ><br>
>> > > It's a complementary relationship but it takes a bit to figure out when<br>
>> > > something should be in one or the other. The line gets blurred at times.<br>
>> > ><br>
>> > > Say you added a new CPU architecture implementation of a math<br>
>> > > method (like Eshan did last year), then it goes in newlib. But he also<br>
>> > > added some POSIX methods which go in RTEMS. In either case,<br>
>> > > we like tests for them in RTEMS to show they work in our environment.<br>
>> > ><br>
>> > > --joel<br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > >><br>
>> > >> Thanks again!<br>
>> > >><br>
>> > >> Matt<br>
>> > >><br>
>> > >> On Fri, Mar 19, 2021 at 1:13 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
>> > >> ><br>
>> > >> ><br>
>> > >> ><br>
>> > >> > On Fri, Mar 19, 2021, 6:40 AM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
>> > >> >><br>
>> > >> >><br>
>> > >> >><br>
>> > >> >> On Fri, Mar 19, 2021, 5:48 AM Matthew Joyce <<a href="mailto:mfjoyce2004@gmail.com" target="_blank">mfjoyce2004@gmail.com</a>> wrote:<br>
>> > >> >>><br>
>> > >> >>> <a href="https://docs.google.com/spreadsheets/d/1reCNOIZC5JTwQENgl-hvG8THfQqNtlUDVy_07PYodic/edit?usp=sharing" rel="noreferrer" target="_blank">https://docs.google.com/spreadsheets/d/1reCNOIZC5JTwQENgl-hvG8THfQqNtlUDVy_07PYodic/edit?usp=sharing</a><br>
>> > >> >>><br>
>> > >> >>> Hello,<br>
>> > >> >>><br>
>> > >> >>> As suggested by Dr. Sherril, I've taken an initial look through this<br>
>> > >> >>> document <a href="https://www.opengroup.org/austin/docs/austin_1110.pdf" rel="noreferrer" target="_blank">https://www.opengroup.org/austin/docs/austin_1110.pdf</a> and<br>
>> > >> >>> added the new methods to a Googe Sheet, linked above.<br>
>> > >> >>><br>
>> > >> >>> None of them appear to be in the RTEMS POSIX API Users Guide, but<br>
>> > >> >>> maybe that's not the right place to look. I'll stand by for your<br>
>> > >> >>> feedback regarding what's possible / desirable to add to RTEMS.<br>
>> > >> >><br>
>> > >> >><br>
>> > >> >> It is possible they are in our C Library or Math Library. Or just not in the manual. The POSIX manual tends to be sparse since you can always use man pages or the POSIX standard.<br>
>> > >> >><br>
>> > >> >> Since you have RTEMS and tools built. Find one of the libc.a and libm.a files in the tools install and librtemscpu.a in the RTEMS build or install. Then try a command something like this:<br>
>> > >> >><br>
>> > >> >> CPU-rtems6-nm LIBRARY | grep SYMBOL<br>
>> > >> >><br>
>> > >> >> If you see it list with T then it is in the text section and there.<br>
>> > >> ><br>
>> > >> ><br>
>> > >> > Following up, I initially answered from my phone and didn't look at source. I am still on my phone but looked through the list and think the last four methods are probably the only ones currently supported.<br>
>> > >> ><br>
>> > >> > <a href="https://sourceware.org/git/?p=newlib-cygwin.git;a=tree;f=newlib/libc/string;h=ceeec602cdd0e6b5c6b002b741bda9b41da4e441;hb=HEAD" rel="noreferrer" target="_blank">https://sourceware.org/git/?p=newlib-cygwin.git;a=tree;f=newlib/libc/string;h=ceeec602cdd0e6b5c6b002b741bda9b41da4e441;hb=HEAD</a><br>
>> > >> ><br>
>> > >> > POSIX support comes from a mix of RTEMS and newlib. That's key to this type of project.<br>
>> > >> ><br>
>> > >> > --joel<br>
>> > >> >><br>
>> > >> >><br>
>> > >> >><br>
>> > >> >>><br>
>> > >> >>> Thanks very much for your time!<br>
>> > >> >>><br>
>> > >> >>> Sincerely,<br>
>> > >> >>><br>
>> > >> >>> Matt<br>
>> > _______________________________________________<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><br>
</blockquote></div></div>