diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-20 17:53:45 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-20 17:53:45 +0100 |
| commit | ca6831144b352e9d8fb7a514cfe717426ad6fa7b (patch) | |
| tree | 9044da1485b791676f470aceacf473fc3826bf76 /dev/Kernel/SystemKit | |
| parent | 6f95c0b5815a4bd3362c1e8fe2241df25318d6fa (diff) | |
ADD: SwapDisk format, you use a custom data structure to work with virtual memory now.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/SystemKit')
| -rw-r--r-- | dev/Kernel/SystemKit/SwapDisk.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/dev/Kernel/SystemKit/SwapDisk.h b/dev/Kernel/SystemKit/SwapDisk.h index 07d3cb73..eee7fdef 100644 --- a/dev/Kernel/SystemKit/SwapDisk.h +++ b/dev/Kernel/SystemKit/SwapDisk.h @@ -18,6 +18,8 @@ namespace Kernel { + struct SWAP_DISK_HEADER; + /// @brief This class is a disk swap delegate for any data. available as a syscall too. class SwapDisk final { @@ -27,7 +29,20 @@ namespace Kernel ZKA_COPY_DEFAULT(SwapDisk); - 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); + BOOL Write(const Char* fork_name, const SizeT fork_name_len, SWAP_DISK_HEADER* data, const SizeT data_len); + SWAP_DISK_HEADER* Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len); }; + + typedef struct SWAP_DISK_HEADER + { + UInt32 fMagic; + SizeT fHeaderSz; + UInt64 fTeamID; + UInt64 fProcessID; + UInt64 fVirtualAddress; + SizeT fBlobSz; + Char fBlob[]; + } PACKED SWAP_DISK_HEADER; + + typedef SWAP_DISK_HEADER* SWAP_DISK_HEADER_REF; } // namespace Kernel |
