On Fri, Apr 06, 2018 at 06:24:34PM +0200, Thomas Monjalon wrote:
> 06/04/2018 13:01, Pavan Nikhilesh:
> > Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8).
> >
> > Fixes: ff2863570fcc ("eal: introduce atomic exchange operation")
>
> Please, could you provide a log of the error?

  CC eal.o
In file included from /root/dpdk/lib/librte_eal/linuxapp/eal/eal.c:33:
In file included from /root/dpdk/build/include/rte_eal_memconfig.h:13:
In file included from /root/dpdk/build/include/rte_rwlock.h:10:
In file included from /root/dpdk/build/include/generic/rte_rwlock.h:25:
In file included from /root/dpdk/build/include/rte_atomic.h:37:
In file included from /root/dpdk/build/include/rte_atomic_64.h:16:
/root/dpdk/build/include/generic/rte_atomic.h:215:9: error: implicit 
declaration of function '__atomic_exchange_2' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
        return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST);
               ^
/root/dpdk/build/include/generic/rte_atomic.h:215:9: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
/root/dpdk/build/include/generic/rte_atomic.h:494:9: error: implicit 
declaration of function '__atomic_exchange_4' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
        return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST);
               ^
/root/dpdk/build/include/generic/rte_atomic.h:494:9: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
/root/dpdk/build/include/generic/rte_atomic.h:772:9: error: implicit 
declaration of function '__atomic_exchange_8' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
        return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST);
               ^
/root/dpdk/build/include/generic/rte_atomic.h:772:9: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
6 errors generated.
make[5]: *** [/root/dpdk/mk/internal/rte.compile-pre.mk:116: eal.o] Error 1


>
> Why __atomic_exchange_n is fixing the compilation?

I guess __atomic_exchange_2/5/8 fall under c++11 standard?
https://llvm.org/docs/Atomics.html
>
>
>

Reply via email to