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:07:53 GMT

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


   So there are two ways to use atomics in C11: 
   
   1) use the _Atomic specifier. No atomic functions are possible, but assign/increment/decrement
are all usable as normal and atomic. I believe these are all SEQ_CST operations, so everything
includes a memory fence now.
   
   2) Do not use the _Atomic specifier, but use atomic_init and assorted functions. This allows
for relaxing the memory model where needed, pollutes the code but eliminates the memory fences
and doesn't reduce performance. However, most operations are not in a hot loop so I believe
performance is not worth the polluting of code.
   
   Which of the two should we go for?


----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message