summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/SystemKit/SwapDisk.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-01 23:25:44 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-01 23:25:44 +0100
commite154cbf9a2a9eedd4c122d6619f25d29e04610ef (patch)
treec02e69a8c41f58ebedc2e1cc0fbc3bb5437116d4 /dev/Kernel/SystemKit/SwapDisk.h
parentad97dd0ac528b837d14e9236369c823dec66aea8 (diff)
IMPL: Update to fixes to kernel and bootloader.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/SystemKit/SwapDisk.h')
-rw-r--r--dev/Kernel/SystemKit/SwapDisk.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/dev/Kernel/SystemKit/SwapDisk.h b/dev/Kernel/SystemKit/SwapDisk.h
new file mode 100644
index 00000000..d2db77b6
--- /dev/null
+++ b/dev/Kernel/SystemKit/SwapDisk.h
@@ -0,0 +1,33 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Theater Quality Corp, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <CompilerKit/CompilerKit.h>
+
+#define kSwapMgrBlockMaxSize (mib_cast(16))
+#define kSwapMgrPageFile "/System/pagefile.sys"
+
+/// @file SwapDisk.h
+/// @brief Virtual memory swap disk.
+
+namespace Kernel
+{
+ /// @brief This class is a disk swap delegate for any data. available as a syscall too.
+ class SwapDiskDelegate final
+ {
+ public:
+ explicit SwapDiskDelegate() = default;
+ ~SwapDiskDelegate() = default;
+
+ ZKA_COPY_DEFAULT(SwapDiskDelegate);
+
+ BOOL Write(const Char* fork_name, const SizeT fork_name_len, VoidPtr data, const SizeT data_len);
+ VoidPtr Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len);
+ };
+} // namespace Kernel \ No newline at end of file