Commit ef81690d authored by mir's avatar mir

_Atomic and c++

parent 16bd57ae
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#define TASK_MANAGER_UE #define TASK_MANAGER_UE
#define TASK_MANAGER_UE_DECODING #define TASK_MANAGER_UE_DECODING
#define TASK_MANAGER_SIM #define TASK_MANAGER_SIM
// LTE // LTE
...@@ -21,10 +20,12 @@ ...@@ -21,10 +20,12 @@
#ifndef __cplusplus #ifndef __cplusplus
#include <stdalign.h>
#include <stdatomic.h> #include <stdatomic.h>
#else #else
#include <atomic> #include <atomic>
#define _Atomic(X) std::atomic< X > #define _Atomic(X) std::atomic< X >
#define _Alignas(X) alignas(X)
#endif #endif
#include <pthread.h> #include <pthread.h>
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
typedef struct{ typedef struct{
// Avoid false sharing // Avoid false sharing
_Alignas(LEVEL1_DCACHE_LINESIZE) _Atomic int completed; _Alignas(LEVEL1_DCACHE_LINESIZE) _Atomic(int) completed;
} task_status_t; } task_status_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment