summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorJakub V. Flasar <38976370+Kubiisek@users.noreply.github.com>2022-03-08 11:45:38 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-03-12 14:54:12 -0800
commitf94293f1216f4843dcba87c8809f17cb619e154f (patch)
tree6a0dd5a517bcab52bf1daf2bed728a359a1dcec5 /Kernel/Arch
parentcc2e08d9e9eac7cb97e321e65d82b55eb141c2de (diff)
downloadserenity-f94293f1216f4843dcba87c8809f17cb619e154f.zip
Kernel: Create a stub mcontext for aarch64
The struct only has a stub integer so that the size is the same for C and C++. Something caught by CLion. This commit was made with mrkct's help!
Diffstat (limited to 'Kernel/Arch')
-rw-r--r--Kernel/Arch/aarch64/mcontext.h22
-rw-r--r--Kernel/Arch/mcontext.h2
2 files changed, 23 insertions, 1 deletions
diff --git a/Kernel/Arch/aarch64/mcontext.h b/Kernel/Arch/aarch64/mcontext.h
new file mode 100644
index 0000000000..c4ebbabab1
--- /dev/null
+++ b/Kernel/Arch/aarch64/mcontext.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2022, the SerenityOS developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Platform.h>
+#include <Kernel/API/POSIX/sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct __attribute__((packed)) __mcontext {
+ int stub;
+};
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/Kernel/Arch/mcontext.h b/Kernel/Arch/mcontext.h
index ee62f487bd..ff9aa4b5ae 100644
--- a/Kernel/Arch/mcontext.h
+++ b/Kernel/Arch/mcontext.h
@@ -11,5 +11,5 @@
#if ARCH(X86_64) || ARCH(I386)
# include <Kernel/Arch/x86/mcontext.h>
#elif ARCH(AARCH64)
-# error "Unknown architecture"
+# include <Kernel/Arch/aarch64/mcontext.h>
#endif