1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

move atomic_state definition

This commit is contained in:
Georg Reinke 2017-05-15 14:47:07 +02:00
parent b21a017cc2
commit a976ab6646
2 changed files with 5 additions and 10 deletions

View file

@ -21,15 +21,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/ *********************************************************************************/
#include "common.h"
#ifdef __cplusplus #ifdef __cplusplus
#include <atomic> #include <atomic>
typedef std::atomic_int atomic_int; typedef std::atomic_int atomic_int;
typedef std::atomic_size_t atomic_size_t; typedef std::atomic_size_t atomic_size_t;
typedef std::atomic_int atomic_state;
#else #else
#include <stdatomic.h> #include <stdatomic.h>
typedef _Atomic enum state atomic_state;
#endif #endif

View file

@ -34,13 +34,3 @@ enum state {
STATE_STOPPED = 5, STATE_STOPPED = 5,
STATE_UNLOADED = 5 /* alias for STATE_STARTED used by plugins */ STATE_UNLOADED = 5 /* alias for STATE_STARTED used by plugins */
}; };
#ifdef __cpluscplus
typedef std::atomic_int atomic_state;
#else
typedef _Atomic enum state atomic_state;
#endif