useconds_t and RTEMS

Joel Sherrill joel.sherrill@OARcorp.com
Thu Jan 25 15:25:00 GMT 2001



Christopher Faylor wrote:
> 
> On Fri, Nov 30, 2001 at 02:09:12PM -0800, Aaron J. Grier wrote:
> >Index: newlib/libc/include/sys/types.h
> >===================================================================
> >RCS file: /cvs/src/src/newlib/libc/include/sys/types.h,v
> >retrieving revision 1.8
> >diff -u -r1.8 types.h
> >--- types.h     2001/11/28 00:16:58     1.8
> >+++ types.h     2001/11/30 22:03:52
> >@@ -218,7 +218,7 @@
> > #define __timer_t_defined
> > #endif
> >
> >-#ifdef __CYGWIN__
> >+#if defined(__rtems__) || defined(__CYGWIN__)
> > typedef long useconds_t;
> > #endif
> >
> >this seems an obvious fix, since unistd.h shows:
> >
> >#if defined(__CYGWIN__) || defined(__rtems__)
> >[...]
> >useconds_t _EXFUN(ualarm, (useconds_t __useconds));
> 
> Do you know for a fact that rtems has ualarm?  If so, why wasn't
> this defined already?

RTEMS does not have ualarm() now but it is trivial to add and
seems useful.  It certainly places no imposition on the
underlying infrastructure.  Everything you need is already there.

> I just added this call for cygwin on Tuesday.  If anything
> it seems like the ualarm declaration should be protected with
> an ifdef __CYGWIN__ .

OK.  So we are just close to being in sync. :)

Is there a standard or proposed standard for this?  Where did
it come from?

Bottom line, if this is going in cygwin, we will add it to
provide at least that level of compatability.  But we want to
know its origin.

> cgf

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@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 Newlib mailing list