about header files used in score

Joel Sherrill joel.sherrill at OARcorp.com
Fri Jun 19 14:12:35 UTC 2009


Zhu Zhongjie wrote:
> I am sorry, open() and lseek() are not suitable examples, maybe 
> execle() opendir() are more suitable.
>
If you look closely at opendir() you will see that it is disabled
if it is in newlib now.

#ifndef HAVE_OPENDIR

There was a period of time where some C library methods were
copied into RTEMS because newlib didn't have fine enough
granularity on configuring the things we could support.

The exec*() methods are in RTEMS because we don't support
them and these are just stubs.  But now we do pull a lot of them
from newlib and provide the one or two require "system calls".

There was a recent push to ensure we used every possible routine
in newlib even if it meant having a high level routine end up
doing work and failing because we didn't support the required
underlying system call.

There is a fuzzy line between C library and system calls.  We
consider pthread_xxx part of the OS while in GNU/Linux these
are in the C library.  There is no requirement on where things
reside -- just that the .h files and C methods are proper.

--joel
> Regards.
> Zhongjie
>
> -----Original Message-----
> *From*: Zhongjie <zhurabbit at gmail.com 
> <mailto:Zhongjie%20%3czhurabbit at gmail.com%3e>>
> *To*: Joel Sherrill <joel.sherrill at oarcorp.com 
> <mailto:Joel%20Sherrill%20%3cjoel.sherrill at oarcorp.com%3e>>
> *Cc*: rtems-users <rtems-users at rtems.org 
> <mailto:rtems-users%20%3crtems-users at rtems.org%3e>>
> *Subject*: Re: about header files used in score
> *Date*: Fri, 19 Jun 2009 17:46:50 +0800
>
> Hi,
> I have done much more study about rtems, I am still confused about the c library.
> It looks like libcsupport has implemented some functions like open() lseek() that 
> usually in c library. 
> If I use those functions, which function will be linked into
> the final executable program?
>
> Regards.
> Zhongjie
>
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list