Commit 17917a5f authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Fix C++ atomic.

parent 07bc5741
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ add_subdirectory(proto)
add_subdirectory(util)

add_executable(sender sender.c)
add_executable(receiver receiver.c)
add_executable(receiver receiver.c ../tests/common.h)

target_link_libraries(sender LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(receiver LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT})
+7 −0
Original line number Diff line number Diff line
@@ -5,6 +5,13 @@
#   define __builtin_ia32_rdtsc() (0)
#endif

#ifndef __cplusplus
# include <stdatomic.h>
#else
# include <atomic>
# define _Atomic(X) std::atomic< X >
#endif

#ifndef MAX
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif
+0 −1
Original line number Diff line number Diff line
#ifndef PRRT_SOCKET_H
#define PRRT_SOCKET_H

#include <stdatomic.h>
#include "../defines.h"
#include "../util/list.h"
#include "../util/pipe.h"
+1 −1
Original line number Diff line number Diff line
#include <pthread.h>
#include <stdatomic.h>
#include "../../defines.h"
#include "../types/packet.h"
#include "../../util/common.h"
#include "../../util/dbg.h"
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
#define PRRT_MPSC_QUEUE_H

#include <stdint.h>
#include <stdatomic.h>
#include "../defines.h"

typedef struct mpscq_node_t mpscq_node_t;

Loading