Change atomic type to int

This commit is contained in:
2020-06-09 10:19:05 +02:00
parent 5d2871185a
commit 51918a3707
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ class FastQueue {
char* buffer_;
std::atomic_int* buffer_status_;
std::atomic_uint16_t write_slot_id_;
std::atomic_uint16_t read_slot_id_;
std::atomic_int write_slot_id_;
std::atomic_int read_slot_id_;
public:
-1
View File
@@ -15,7 +15,6 @@ FastQueue<T>::FastQueue(
buffer_ = new char[slot_n_bytes_ * n_slots_];
buffer_status_ = new atomic_int[n_slots];
// TODO: Are atomic variables initialized?
for (size_t i=0; i < n_slots_; i++) {
buffer_status_[i] = 0;
}