[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200709261746.14632.p.giarrusso@gmail.com>
Date: Wed, 26 Sep 2007 17:46:13 +0200
From: Paolo Giarrusso <p.giarrusso@...il.com>
To: user-mode-linux-devel@...ts.sourceforge.net
Cc: Thomas Gleixner <tglx@...utronix.de>,
Jeff Dike <jdike@...toit.com>, Andrew Morton <akpm@...l.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [uml-devel] [PATCH] UML - time build fix
On mercoledì 26 settembre 2007, Thomas Gleixner wrote:
> Jeff,
>
> On Tue, 2007-09-25 at 17:56 -0400, Jeff Dike wrote:
> > On Tue, Sep 25, 2007 at 09:54:15PM +0200, Thomas Gleixner wrote:
> > > On Tue, 2007-09-25 at 13:37 -0400, Jeff Dike wrote:
> > > > Put back an implementation of timeval_to_ns in
> > > > arch/um/os-Linux/time.c. tglx pointed out in his review of tickless
> > > > support that there was a perfectly good implementation of it in
> > > > linux/time.h. The problem is that this is userspace code which can't
> > > > pull in kernel headers and there doesn't seem to be a libc version.
> > >
> > > Oops. Did not notice.
> >
> > It's a UML peculiarity...
> >
> > > Can't we move it into some header file which is accessible from
> > > everywhere ?
There is a way to do this without code duplication, but it is creating a
non-inline function which calls the inline and calling the non-inline from
userspace. It's done for a variety of other functions.
There is a tradeoff of speed vs code duplication - and if this function is not
supposed to change and to need to be kept in sync, it could be copied. I
conceptually hate this solution, but it can make some sense.
--
"Doh!" (cit.), I've made another mistake!
Paolo Giarrusso, aka Blaisorblade
Download attachment "signature.asc " of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists