celix-dev mailing list archives

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

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

   If we introduce atomic, then I prefer that we use the c11 standard stuff for that.
   This means update the top level cmake lists file to use -std=c11 instead of -std=gnu99
   use the function in <stdatomic.h> instead of gcc builtins.
   Something like:
   #include <sdtatomic.h>
   struct celix_bundle {
   	bundle_context_pt context;
       char *symbolicName; //for debug
   	struct celix_bundle_activator *activator;
   	_Atomic(bundle_state_e) state;
   	void * handle;
   	bundle_archive_pt archive;
   	array_list_pt modules;
   	manifest_pt manifest;
   	celix_framework_t *framework;
   state = atomic_load_explicit(&bundle->state, __ATOMIC_ACQUIRE);
   atomic_store_explicit(&bundle->state, state, __ATOMIC_RELEASE);
   This also means we bump the required compiler from gnu99 compatible to c11 compatible.

   Seeing that it is 2020 I have no problem with that. 
   @abroekhuis, @rlenferink and @rbulter WDYT?

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