diff mbox series

[3/3] qemu/atomic128: Include missing 'qemu/atomic.h' header

Message ID 20241212141018.59428-4-philmd@linaro.org (mailing list archive)
State New
Headers show
Series qemu/atomic: Header cleanups | expand

Commit Message

Philippe Mathieu-Daudé Dec. 12, 2024, 2:10 p.m. UTC
qatomic_cmpxchg__nocheck() is declared in "qemu/atomic.h".
Include it in order to avoid when refactoring unrelated headers:

    In file included from ../../accel/tcg/tcg-runtime-gvec.c:22:
    In file included from include/exec/helper-proto-common.h:10:
    In file included from include/qemu/atomic128.h:61:
    host/include/generic/host/atomic128-cas.h.inc:23:11: error: call to undeclared function 'qatomic_cmpxchg__nocheck'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
       23 |     r.i = qatomic_cmpxchg__nocheck(ptr_align, c.i, n.i);
          |           ^
    1 error generated.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/qemu/atomic128.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson Dec. 12, 2024, 3:03 p.m. UTC | #1
On 12/12/24 08:10, Philippe Mathieu-Daudé wrote:
> qatomic_cmpxchg__nocheck() is declared in "qemu/atomic.h".
> Include it in order to avoid when refactoring unrelated headers:
> 
>      In file included from ../../accel/tcg/tcg-runtime-gvec.c:22:
>      In file included from include/exec/helper-proto-common.h:10:
>      In file included from include/qemu/atomic128.h:61:
>      host/include/generic/host/atomic128-cas.h.inc:23:11: error: call to undeclared function 'qatomic_cmpxchg__nocheck'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>         23 |     r.i = qatomic_cmpxchg__nocheck(ptr_align, c.i, n.i);
>            |           ^
>      1 error generated.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/qemu/atomic128.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/include/qemu/atomic128.h b/include/qemu/atomic128.h
> index 448fb644799..31e5c48d8fa 100644
> --- a/include/qemu/atomic128.h
> +++ b/include/qemu/atomic128.h
> @@ -13,6 +13,7 @@
>   #ifndef QEMU_ATOMIC128_H
>   #define QEMU_ATOMIC128_H
>   
> +#include "qemu/atomic.h"
>   #include "qemu/int128.h"
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/include/qemu/atomic128.h b/include/qemu/atomic128.h
index 448fb644799..31e5c48d8fa 100644
--- a/include/qemu/atomic128.h
+++ b/include/qemu/atomic128.h
@@ -13,6 +13,7 @@ 
 #ifndef QEMU_ATOMIC128_H
 #define QEMU_ATOMIC128_H
 
+#include "qemu/atomic.h"
 #include "qemu/int128.h"
 
 /*