aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/arch.h19
-rw-r--r--lib/arch/api.h14
-rw-r--r--lib/executor.cc2
-rw-r--r--lib/thread.cc2
4 files changed, 16 insertions, 21 deletions
diff --git a/lib/arch.h b/lib/arch.h
deleted file mode 100644
index a02fdba..0000000
--- a/lib/arch.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (c) 2020 Johannes Stoelp */
-
-#pragma once
-
-#if !defined(linux)
-static_assert(false, "Matcha Threads only supported on Linux!");
-#endif
-
-#if defined(__x86_64__) || defined(__amd64__)
-// fall-through: x86_64 support
-#elif defined(__aarch64__)
-// fall-through: arm64 support
-#elif defined(__arm__)
-// fall-through: armv7 support
-#else
-static_assert(false, "Unsupported architecture!");
-#endif
-
-#include "arch/api.h"
diff --git a/lib/arch/api.h b/lib/arch/api.h
index adf773e..3dd5c92 100644
--- a/lib/arch/api.h
+++ b/lib/arch/api.h
@@ -2,6 +2,20 @@
#pragma once
+#if !defined(linux)
+static_assert(false, "Matcha Threads only supported on Linux!");
+#endif
+
+#if defined(__x86_64__) || defined(__amd64__)
+// fall-through: x86_64 support
+#elif defined(__aarch64__)
+// fall-through: arm64 support
+#elif defined(__arm__)
+// fall-through: armv7 support
+#else
+static_assert(false, "Unsupported architecture!");
+#endif
+
// Platform specific API.
// When integrating a new platform the following functions must be implemented.
diff --git a/lib/executor.cc b/lib/executor.cc
index 52bdf01..b54c949 100644
--- a/lib/executor.cc
+++ b/lib/executor.cc
@@ -2,7 +2,7 @@
#include "executor.h"
-#include "arch.h"
+#include "arch/api.h"
namespace nMatcha {
const void* Executor::getStackPtr() const {
diff --git a/lib/thread.cc b/lib/thread.cc
index 304091d..d69b855 100644
--- a/lib/thread.cc
+++ b/lib/thread.cc
@@ -2,7 +2,7 @@
#include "thread.h"
-#include "arch.h"
+#include "arch/api.h"
#include "executor.h"
#include <cassert>