Messages in this thread | | | Date | Wed, 15 Dec 1999 09:33:50 -0500 | From | Raul Miller <> | Subject | Re: 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/
| |