summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/SystemKit/Swap.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-29 20:01:56 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-29 20:01:56 +0100
commitfecc323112c23fdade315f008a828256892e3bc8 (patch)
tree5494e0e13b3f2b4c0e383a8501b6a6a30981734c /dev/Kernel/SystemKit/Swap.h
parent8b7216aaf2dacad7ce67d734d07b047fed8ec01e (diff)
IMPL: SwapDiskDelegate.h class and Swap API.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/SystemKit/Swap.h')
-rw-r--r--dev/Kernel/SystemKit/Swap.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/dev/Kernel/SystemKit/Swap.h b/dev/Kernel/SystemKit/Swap.h
index 5d9d1ade..4ba59bcb 100644
--- a/dev/Kernel/SystemKit/Swap.h
+++ b/dev/Kernel/SystemKit/Swap.h
@@ -8,11 +8,26 @@
#pragma once
#include <NewKit/Defines.h>
+#include <CompilerKit/CompilerKit.h>
-#define kSwapMgrBlockMaxSize mib_cast(16)
-#define KSwapMgrBlockMagic "SWEP "
-
-#define kSwapMgrPageFile "/System/pagefile.sys"
+#define kSwapMgrBlockMaxSize (mib_cast(16))
+#define kSwapMgrPageFile "/System/pagefile.sys"
/// @file Swap.h
/// @brief Virtual memory swap API.
+
+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