summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/KernelKit/PCI/Device.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-30 09:51:43 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-30 09:54:07 -0500
commitd3892e80f787f86062733bd8ad3e725fb548d6fe (patch)
tree25029f4e491e3da39b6ce66760f8742ad73f16d2 /src/kernel/KernelKit/PCI/Device.h
parentba3cd2194412914936c1c00efe87391d0615cd17 (diff)
chore: added new aliases for OwnPtr and ErrorOr (OwnOr)
chore: use STATIC_PASS instead of static_assert in /src/kernel. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/KernelKit/PCI/Device.h')
-rw-r--r--src/kernel/KernelKit/PCI/Device.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/KernelKit/PCI/Device.h b/src/kernel/KernelKit/PCI/Device.h
index c8caf67c..e9c5a683 100644
--- a/src/kernel/KernelKit/PCI/Device.h
+++ b/src/kernel/KernelKit/PCI/Device.h
@@ -3,9 +3,11 @@
Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
======================================== */
+
#pragma once
#include <NeKit/Config.h>
+#include <NeKit/KernelPanic.h>
namespace Kernel::PCI {
enum class PciConfigKind : UShort {
@@ -38,13 +40,13 @@ class Device final {
public:
template <typename T>
UInt Read(UInt bar) {
- static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
+ STATIC_PASS(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
return Read(bar, sizeof(T));
}
template <typename T>
void Write(UInt bar, UIntPtr data) {
- static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
+ STATIC_PASS(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
Write(bar, data, sizeof(T));
}