Skip to content
Snippets Groups Projects

use DIE* macros instead of the die function

Merged Florian Fischer requested to merge use_die_macro into master
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
+ 3
3
@@ -9,7 +9,7 @@
#include <iostream> // for hash
#include <vector> // for vector
#include "Common.hpp" // for die
#include "Common.hpp" // for DIE
#include "CountingPrivateSemaphore.hpp" // for CPS
#include "Fiber.hpp" // for Fiber
#include "Runtime.hpp" // for Runtime
@@ -32,7 +32,7 @@ auto main() -> int {
// Allocate new hash table.
ht = cds_lfht_new(1, 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, nullptr);
if (!ht) {
die("Error allocating hash table", false);
DIE_MSG("Error allocating hash table");
}
Fiber* verifier = Fiber::from([&]() {
@@ -43,7 +43,7 @@ auto main() -> int {
[&ht, value] {
auto* node = reinterpret_cast<node_t*>(malloc(sizeof(node_t)));
if (!node) {
die("allocating node failed", true);
DIE_MSG_ERRNO("allocating node failed");
}
cds_lfht_node_init(&node->node);
Loading