From 8c500f29bd0ef17f5b59e5be49f4cae88d827d85 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 23 Apr 2025 09:11:33 +0200 Subject: dev, kernel: scheduler and disk swap refactors. Details: - Reworked SCSI groundwork to prepare for a Generic SCSI driver. - Refatored scheduler's code with the new coding style for structs. - Add Leak and LeakBlob inside PROCESS_IMAGE struct. Signed-off-by: Amlal El Mahrouss --- dev/kernel/SwapKit/DiskSwap.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'dev/kernel/SwapKit') diff --git a/dev/kernel/SwapKit/DiskSwap.h b/dev/kernel/SwapKit/DiskSwap.h index 0e32eff5..78b1a896 100644 --- a/dev/kernel/SwapKit/DiskSwap.h +++ b/dev/kernel/SwapKit/DiskSwap.h @@ -9,9 +9,10 @@ #include #include +#include #define kSwapBlockMaxSize (mib_cast(16)) -#define kSwapPageFile "/boot/pagefile.sys" +#define kSwapPageFilePath "/boot/pagefile.sys" /// @file SwapDisk.h /// @brief Virtual memory swap disk. @@ -19,15 +20,18 @@ namespace Kernel { struct SWAP_DISK_HEADER; + class DiskSwapInterface; /// @brief Virtual memory interface to swap memory chunks onto disk. - class SwapDiskInterface final + /// @note The class only supports the NeFS as of right now, as it is using forks to write data into disk. + class DiskSwapInterface final { public: - explicit SwapDiskInterface() = default; - ~SwapDiskInterface() = default; + explicit DiskSwapInterface() = default; + ~DiskSwapInterface() = default; - NE_COPY_DEFAULT(SwapDiskInterface) + NE_COPY_DELETE(DiskSwapInterface) + NE_MOVE_DELETE(DiskSwapInterface) public: /***********************************************************************************/ @@ -46,7 +50,7 @@ namespace Kernel /// @param data the data packet length. /// @return Whether the swap was fetched to disk, or not. /***********************************************************************************/ - SWAP_DISK_HEADER* Read(const Char* fork_name, SizeT fork_name_len, SizeT data_len); + _Output SWAP_DISK_HEADER* Read(const Char* fork_name, SizeT fork_name_len, SizeT data_len); }; /// @brief Swap disk header, containing information about the held virtual memory. -- cgit v1.2.3