[CALUG] gettimeofday()

Nikolas Coukouma atrus at atrus.org
Sun Mar 29 01:39:35 EDT 2009


2009/3/28 Jason C. Miller <jason.c.miller at gmail.com>:
...
> Here's the wierdness.  Gettimeofday() is a system call.  The internet, man
> page, and common knowledge all support that premise.  I have two linux
> machines at home that I'm running this test program on.  The gettimeofday()
> call shows up in the ltrace (understandably) of both machines, however, it
> shows up in the strace of only one of them.
>
> The machine that does NOT show it as a system call is running FC9
> (2.6.27.7-53.fc9.x86_64 #1 SMP).
>
> The machine that DOES show it as a system call is FC10
> (2.6.27.19-170.2.35.fc10.i686 #1 SMP).
...

Short version: on x86-64, it's a vsyscall. Longer version:
http://transnum.blogspot.com/2009/01/linuxs-vsyscall.html

Cheers,
-Nikolas




More information about the CALUG mailing list