aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/concurrent_ring_buffer.h
diff options
context:
space:
mode:
authorGravatar archshift <admin@archshift.com>2015-01-20 17:16:47 -0800
committerGravatar archshift <admin@archshift.com>2015-02-10 18:30:31 -0800
commitef24e72b2618806f64345544fa46c84f3f494890 (patch)
treefca138e8377c4d66bd1fe026a3d2fef54a7f090c /src/common/concurrent_ring_buffer.h
parent168eb27aee7992b8abf9f505b8c246a25fc8dca5 (diff)
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
Diffstat (limited to 'src/common/concurrent_ring_buffer.h')
-rw-r--r--src/common/concurrent_ring_buffer.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/concurrent_ring_buffer.h b/src/common/concurrent_ring_buffer.h
index 311bb01f..fc18e6c8 100644
--- a/src/common/concurrent_ring_buffer.h
+++ b/src/common/concurrent_ring_buffer.h
@@ -11,7 +11,6 @@
#include <thread>
#include "common/common.h" // for NonCopyable
-#include "common/log.h" // for _dbg_assert_
namespace Common {
@@ -93,7 +92,7 @@ public:
return QUEUE_CLOSED;
}
}
- _dbg_assert_(Common, CanRead());
+ DEBUG_ASSERT(CanRead());
return PopInternal(dest, dest_len);
}
@@ -119,7 +118,7 @@ private:
size_t PopInternal(T* dest, size_t dest_len) {
size_t output_count = 0;
while (output_count < dest_len && CanRead()) {
- _dbg_assert_(Common, CanRead());
+ DEBUG_ASSERT(CanRead());
T* item = &Data()[reader_index];
T out_val = std::move(*item);