mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Question about musl's time() implementation in time.c
@ 2022-06-07 12:25 Zev Levy Stevenson
  2022-06-07 14:29 ` Arnd Bergmann
  0 siblings, 1 reply; 14+ messages in thread
From: Zev Levy Stevenson @ 2022-06-07 12:25 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Hi all,

While running the libc-test test suite on a customized clang+musl build, I
had trouble with some of the tests because of issues with time accuracy.
I can go in detail if needed, but the problem seemed to boil down to the
time() function in musl (in src/time/time.c) using a clock_gettime syscall
(without vdso) instead of using the Linux time syscall that we expected it
to use. Some other libc implementations use this syscall, and indeed after
switching the syscall used in time () the tests passed, seemingly because
the accuracy of the clocks used matched up.
My main question is why musl's implementation doesn't use the time syscall,
I'd be happy to hear if there was a special reason for this.

Thanks, Zev

[-- Attachment #2: Type: text/html, Size: 918 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-06-16 14:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 12:25 [musl] Question about musl's time() implementation in time.c Zev Levy Stevenson
2022-06-07 14:29 ` Arnd Bergmann
2022-06-07 16:30   ` Rich Felker
2022-06-10  8:52     ` Zev Levy Stevenson
2022-06-14 16:50       ` Arnd Bergmann
2022-06-14 17:00         ` Rich Felker
2022-06-14 20:37           ` Arnd Bergmann
2022-06-14 20:49             ` Rich Felker
2022-06-14 21:11               ` Arnd Bergmann
2022-06-14 23:28                 ` Rich Felker
2022-06-15 12:09                   ` Arnd Bergmann
2022-06-15 16:55                     ` Adhemerval Zanella
2022-06-16  9:06                     ` Thomas Gleixner
2022-06-16 14:57       ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).