celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] Oipo commented on pull request #214: Fix data race in get/set bundle state
Date Sun, 03 May 2020 20:49:50 GMT

Oipo commented on pull request #214:
URL: https://github.com/apache/celix/pull/214#issuecomment-623179786

   Okay, testing it with clang shows that clang follows the spec more strictly. All c11 atomic
functions should only be done on _Atomic specified variables. However, _Atomic is not available
in C++. There is a workaround, but you rely on the compiler to make it binary-compatible (no
guarantees between compiler versions)
   #ifdef __cplusplus
   #include <atomic>
   #define CELIX_ATOMIC(type) std::atomic<type>
   #include <stdatomic.h>
   #define CELIX_ATOMIC(type) _Atomic type
   See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 for more info
   I'm now against using C11 atomics and prefer my original approach, using the __atomic builtins.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message