Re: [PATCH v2 1/4] tools/rtla: Consolidate nr_cpus usage across all tools
From: Tomas Glozar
Date: Wed Feb 11 2026 - 06:16:43 EST
st 11. 2. 2026 v 12:03 odesílatel Wander Lairson Costa
<wander@xxxxxxxxxx> napsal:
> > `#pragma once` in timerlat_u.h is needed for pre-C23 compilers to avoid
> > redefinition errors.
>
> Isn't it necessary for C23 compilers?
>
C23 allowed struct redefinition [1] to enable template-like macros. As
a side effect, including timerlat_u.h twice does not break anything,
in C23 only. But the Linux kernel supports building with lower
standards of C, so it has to work there, too.
Tomas
[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3003.pdf