Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 19 Nov 2022 13:31:45 -0500
From: Rich Felker <>
To: 罗勇刚(Yonggang Luo) <>
Cc:, Jens Gustedt <>,
	Jason Ekstrand <>
Subject: Re: C23 implications for C libraries

On Sat, Nov 19, 2022 at 04:46:22AM +0800, 罗勇刚(Yonggang Luo) wrote:
> There is a concept called CLOCK_MONOTONIC_RAW  (since Linux 2.6.28;
> Linux-specific),
> May C2x provide TIME_MONOTONIC_RAW in future or can we just implement
> CLOCK_MONOTONIC_RAW  on Linux? When implement mesa vulkan driver, it's ask
> May intention is using C2x timespec_get to replace function
> vk_clock_gettime but it's lack of  TIME_MONOTONIC_RAW, so I don't know
> what's the best way

The code there is already doing exactly what it should do in the case
where CLOCK_MONOTONIC_RAW is not defined so I'm not sure what you're
trying to achieve.

On a system where CLOCK_MONOTONIC_RAW is defined, the caller may have
(for likely-nonsensical reasons) chosen to pass CLOCK_MONOTONIC_RAW,
and they're handling the case where the kernel is too old to have that
extension clock by substituting CLOCK_MONOTONIC instead.

If CLOCK_MONOTONIC_RAW is not defined, then most certainly the caller
did not pass it (since there's no such thing) and thus there is no
need for any fallback code.

No action is needed at all here.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.