Skip to content

Commit

Permalink
Move macro test to common area.
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Dec 20, 2023
1 parent d56a1df commit 843a22e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 22 deletions.
5 changes: 0 additions & 5 deletions src/include/homestore/btree/detail/btree_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@
#include <sisl/utility/obj_life_counter.hpp>
#include "btree_internal.hpp"
#include <homestore/btree/btree_kv.hpp>
// #include <iomgr/iomgr_flip.hpp>
#ifndef NO_ISAL
#include <isa-l/crc.h>
#else
#include "common/crc.h"
#endif

namespace homestore {
ENUM(locktype_t, uint8_t, NONE, READ, WRITE)
Expand Down
7 changes: 7 additions & 0 deletions src/lib/common/crc.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#pragma once

// Only x86 and x86_64 supported by Intel Storage Acceleration library
#ifndef NO_ISAL
#include <isa-l/crc.h>

#else

#define MAX_ITER 8

extern "C" {
Expand Down Expand Up @@ -37,3 +43,4 @@ static inline uint32_t crc32_ieee(uint32_t seed, const unsigned char* buf, uint6
return ~rem;
}
}
#endif
4 changes: 0 additions & 4 deletions src/lib/device/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
#include <map>
#include <vector>

#ifndef NO_ISAL
#include <isa-l/crc.h>
#else
#include "common/crc.h"
#endif
#include <iomgr/iomgr.hpp>
#include <sisl/fds/sparse_vector.hpp>
#include <homestore/homestore_decl.hpp>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/device/device_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#include <vector>

#include <iomgr/iomgr.hpp>
#ifndef NO_ISAL
#include <isa-l/crc.h>
#else
#include "common/crc.h"
#endif
#include <sisl/logging/logging.h>

#include <boost/uuid/random_generator.hpp>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/device/physical_dev.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@

#include <boost/icl/split_interval_set.hpp>
#include <nlohmann/json.hpp>
#ifndef NO_ISAL
#include <isa-l/crc.h>
#else
#include "common/crc.h"
#endif
#include <sisl/metrics/metrics.hpp>
#include <sisl/logging/logging.h>
#include <homestore/homestore_decl.hpp>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/logstore/log_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
*********************************************************************************/
#include <cstring>

#ifndef NO_ISAL
#include <isa-l/crc.h>
#else
#endif

#include <homestore/logstore/log_store.hpp>
#include "common/homestore_assert.hpp"
#include "log_dev.hpp"
Expand Down

0 comments on commit 843a22e

Please sign in to comment.