[PATCH] Support for sysconf(_SC_MONOTONIC_CLOCK)

Peter Kjellerstedt peter.kjellerstedt at axis.com
Mon Sep 18 16:18:29 UTC 2006


> -----Original Message-----
> From: uclibc-bounces at uclibc.org 
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Rich Felker
> Sent: Monday, September 18, 2006 17:54
> To: uclibc at uclibc.org
> Subject: Re: [PATCH] Support for sysconf(_SC_MONOTONIC_CLOCK)
> 
> On Mon, Sep 18, 2006 at 05:21:57PM +0200, Peter Kjellerstedt wrote:
> > +    case _SC_MONOTONIC_CLOCK:
> > +#ifdef __NR_clock_getres
> > +      /* Check using the clock_getres system call.  */
> > +      {
> > +        static inline _syscall2(int, clock_getres, 
> clockid_t, clock_id, struct timespec*, res);
> 
> This is a nested function -- are they allowed in uclibc?? If inlining
> is disabled it might even result in an executable stack requirement.
> IMO put the syscall macro where it belongs, outside of functions.
> 
> Other than that, no comments, you'll have to wait to hear what the
> actual developers say.
> 
> Rich

That sounds fair.  But then I realized that I could just call the
clock_getres() that is already build into the library, and thus
avoid the "trouble" of using a syscall directly.  Anyway, here is
an updated patch that I believe and hope should be ok to commit.

//Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sysconf.patch
Type: application/octet-stream
Size: 543 bytes
Desc: sysconf.patch
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20060918/5734efd4/attachment-0002.obj 


More information about the uClibc mailing list