meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The test code was missing a semicolon after the pthread_condattr_t
variable declaration.
Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index d7c4095b39..5447504ea8 100644
--- a/meson.build
+++ b/meson.build
@@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
int main(void)
{
- pthread_condattr_t attr
+ pthread_condattr_t attr;
pthread_condattr_init(&attr);
pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
return 0;
--
2.34.1
Queued, thanks. Paolo
Stepan Popov <Stepan.Popov@kaspersky.com> writes:
> The test code was missing a semicolon after the pthread_condattr_t
> variable declaration.
>
> Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index d7c4095b39..5447504ea8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
>
> int main(void)
> {
> - pthread_condattr_t attr
> + pthread_condattr_t attr;
> pthread_condattr_init(&attr);
> pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
> return 0;
Good catch:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
I guess we've just been silently failing that test since it was
introduced then?
Cached compiler stderr:
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c: In function 'main':
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c:23:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pthread_condattr_init'
23 | pthread_condattr_init(&attr);
| ^~~~~~~~~~~~~~~~~~~~~
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c:23:28: error: 'attr' undeclared (first use in this function)
23 | pthread_condattr_init(&attr);
| ^~~~
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c:23:28: note: each undeclared identifier is reported only once for each function it appears in
Using cached compile:
Cached command line: cc -m64 /home/alex/lsrc/qemu.git/builds/all/meson-private/tmppx1fde_i/testfile.c -o /home/alex/lsrc/qemu.git/builds/all/meson-private/tmppx1fde_i/output.exe -pthread -D_FILE_OFFSET_BITS=64 -O0 -std=gnu11
So maybe:
Fixes: 657ac98b58c (thread-posix: use monotonic clock for QemuCond and QemuSemaphore)
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
Hi
On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
>
> The test code was missing a semicolon after the pthread_condattr_t
> variable declaration.
>
> Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
QemuSemaphore")
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index d7c4095b39..5447504ea8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
>
> int main(void)
> {
> - pthread_condattr_t attr
> + pthread_condattr_t attr;
> pthread_condattr_init(&attr);
> pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
> return 0;
> --
> 2.34.1
>
On Mon, Mar 30, 2026 at 05:32:33PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
> >
> > The test code was missing a semicolon after the pthread_condattr_t
> > variable declaration.
> >
> > Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
>
> Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
> QemuSemaphore")
IOW, that commit has been dead code since it was first added years ago,
we've never used the monotonic clock
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> > ---
> > meson.build | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meson.build b/meson.build
> > index d7c4095b39..5447504ea8 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
> >
> > int main(void)
> > {
> > - pthread_condattr_t attr
> > + pthread_condattr_t attr;
> > pthread_condattr_init(&attr);
> > pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
> > return 0;
> > --
> > 2.34.1
> >
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
On Mon, 30 Mar 2026 at 14:36, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Mon, Mar 30, 2026 at 05:32:33PM +0400, Marc-André Lureau wrote:
> > Hi
> >
> > On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
> > >
> > > The test code was missing a semicolon after the pthread_condattr_t
> > > variable declaration.
> > >
> > > Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
> >
> > Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
> > QemuSemaphore")
>
> IOW, that commit has been dead code since it was first added years ago,
> we've never used the monotonic clock
Yes. So are we confident enough in that never-tested feature to want to
enable it at this point in the release cycle, or should we hold off on
this bugfix until 11.1 ?
-- PMM
On Mon, Mar 30, 2026 at 4:20 PM Peter Maydell <peter.maydell@linaro.org> wrote: > > IOW, that commit has been dead code since it was first added years ago, > > we've never used the monotonic clock > > Yes. So are we confident enough in that never-tested feature to want to > enable it at this point in the release cycle, or should we hold off on > this bugfix until 11.1 ? In practice the difference between the two is almost always unnoticeable. Because it affects pthread_cond_timedwait, the only difference would mean making a timeout slighly shorter or longer... and just once. It's just unaesthetic to use CLOCK_REALTIME instad of CLOCK_MONOTONIC. Paolo
On Mon, Mar 30, 2026 at 03:19:40PM +0100, Peter Maydell wrote:
> On Mon, 30 Mar 2026 at 14:36, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Mon, Mar 30, 2026 at 05:32:33PM +0400, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
> > > >
> > > > The test code was missing a semicolon after the pthread_condattr_t
> > > > variable declaration.
> > > >
> > > > Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
> > >
> > > Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
> > > QemuSemaphore")
> >
> > IOW, that commit has been dead code since it was first added years ago,
> > we've never used the monotonic clock
>
> Yes. So are we confident enough in that never-tested feature to want to
> enable it at this point in the release cycle, or should we hold off on
> this bugfix until 11.1 ?
IMHO waiting until 11.1 is the prudent approach. This is not a
regression fix and clearly no one noticed it wasn't doing anything
for 3 years since it was introduced, so fixing it can't be that
urgent ?
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
© 2016 - 2026 Red Hat, Inc.