summaryrefslogtreecommitdiff
path: root/Kernel/Arch/Delay.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-09-02 11:23:32 +0300
committerLinus Groh <mail@linusgroh.de>2022-09-20 18:43:05 +0100
commit84fbab6803bcb6ed02335a9b9bf83545a18cf4a4 (patch)
treeac231cce6bf7a3e952efc1dea35dbb73c2ae85db /Kernel/Arch/Delay.h
parentcac72259d00fecb9b638adab2c32fc2c5943e1da (diff)
downloadserenity-84fbab6803bcb6ed02335a9b9bf83545a18cf4a4.zip
Kernel: Move IO delay code to x86 architecture subdirectory
Many code patterns and hardware procedures rely on reliable delay in the microseconds granularity, and since they are using such delays which are valid cases, but should not rely on x86 specific code, we allow to determine in compile time the proper platform-specific code to use to invoke such delays.
Diffstat (limited to 'Kernel/Arch/Delay.h')
-rw-r--r--Kernel/Arch/Delay.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Kernel/Arch/Delay.h b/Kernel/Arch/Delay.h
new file mode 100644
index 0000000000..5b9f0be551
--- /dev/null
+++ b/Kernel/Arch/Delay.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Types.h>
+
+namespace Kernel {
+
+void microseconds_delay(u32 microseconds);
+
+}