[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] Add a monotonic time device

From: Pino Toscano
Subject: Re: [PATCH 4/4] Add a monotonic time device
Date: Thu, 17 Nov 2011 23:10:16 +0100
User-agent: KMail/1.13.7 (Linux/3.0.0-1-amd64; KDE/4.6.5; x86_64; ; )

Alle sabato 27 agosto 2011, Samuel Thibault ha scritto:
> Roland McGrath, le Sat 27 Aug 2011 10:03:24 -0700, a écrit :
> > > Pino Toscano, le Fri 26 Aug 2011 20:29:43 +0200, a écrit :
> > > > +extern vm_offset_t monotonicmmap();
> > > > +#define        monotonicname           "monotonic"
> > > 
> > > Ah, I was rather thinking about appending the new clock to the
> > > existing mappable clock.  I don't think it is useful to separate
> > > them.
> > 
> > It does seem good to consolidate on the one page, no reason to have
> > two pages.  But how exactly will the user tell that he has a new
> > kernel that has both? It could be by some magic number on the page
> > or something.
> It could simply be the field being non-zero?

Won't that be problematic when running a newer glibc with a older 
gnumach that does not zero the page?

> > But
> > perhaps it's better just to have a new device name that's an alias
> > for "time", but only recognized by new microkernels that are
> > supplying the additional words on the same page.
> That's another way indeed.

I will try this way, thanks for the hint.

I was thinking that we could combine the new alias hint with an extended 
mapped_time_value struct e.g. like this:

struct mapped_time_value_extended {
  integer_t seconds;
  integer_t microseconds;
  integer_t check_seconds;
  integer_t mapped_time_magic;
  /* new in mapped_time_magic >= 1 */
  signed64_t time_nanoseconds;
  integer_t monotonic_seconds; /* or signed64_t here too? */
  signed64_t monotonic_nanoseconds;

so we have a magic value that would indicate extensions, and already 
adding fields for nanoseconds precision (so glibc will be able to deal 
with them, even if gnumach would not be more precise than microseconds, 
for now).

Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]