lkml.org 
[lkml]   [1999]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: gettimeofday() a special case : how?
Andrea Arcangeli <andrea@suse.de> wrote:
> Maybe there's a trival way to implement the lock-less critical section
> and I am missing it...

If you move it to user space, I think the answer is probably don't do that.

When something happens at the clock that would require a potential
backwards correction, you change the handler in the magic mapped page
to call the kernel routine. Then you muck with things and when they're
stable you revert to the fast user mode code.

Note that this is related to a ptrace issue: if you want things like
strace to continue to show gettimeofday calls you'll probably have
to use the unmagical magic page for processes running under ptrace.

Maybe someone will see a better solution in the future, but this
seems relatively simple.

--
Raul


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.064 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site