Skip to content
Snippets Groups Projects
Commit 72faa0b1 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'use_die_macro' into 'master'

use DIE* macros instead of the die function

See merge request !33
parents 362f4909 67094f6c
No related branches found
No related tags found
1 merge request!33use DIE* macros instead of the die function
Pipeline #52967 passed
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <iostream> // for hash #include <iostream> // for hash
#include <vector> // for vector #include <vector> // for vector
#include "Common.hpp" // for die #include "Common.hpp" // for DIE
#include "CountingPrivateSemaphore.hpp" // for CPS #include "CountingPrivateSemaphore.hpp" // for CPS
#include "Fiber.hpp" // for Fiber #include "Fiber.hpp" // for Fiber
#include "Runtime.hpp" // for Runtime #include "Runtime.hpp" // for Runtime
...@@ -32,7 +32,7 @@ auto main() -> int { ...@@ -32,7 +32,7 @@ auto main() -> int {
// Allocate new hash table. // Allocate new hash table.
ht = cds_lfht_new(1, 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, nullptr); ht = cds_lfht_new(1, 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, nullptr);
if (!ht) { if (!ht) {
die("Error allocating hash table", false); DIE_MSG("Error allocating hash table");
} }
Fiber* verifier = Fiber::from([&]() { Fiber* verifier = Fiber::from([&]() {
...@@ -43,7 +43,7 @@ auto main() -> int { ...@@ -43,7 +43,7 @@ auto main() -> int {
[&ht, value] { [&ht, value] {
auto* node = reinterpret_cast<node_t*>(malloc(sizeof(node_t))); auto* node = reinterpret_cast<node_t*>(malloc(sizeof(node_t)));
if (!node) { if (!node) {
die("allocating node failed", true); DIE_MSG_ERRNO("allocating node failed");
} }
cds_lfht_node_init(&node->node); cds_lfht_node_init(&node->node);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment