diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-27 17:38:23 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-27 17:38:23 +0100 |
| commit | 1ce16b83dba0326b13dfa3399c1497ac6b1af14d (patch) | |
| tree | 8a5e4063b5d4cf6ce4f42dd500073994e9ef8954 /Private/KernelKit | |
| parent | 6a18e607ffc4e83f2bd953c9de5c14f18e077df8 (diff) | |
Kernel && Developer:
Developer:
- Rework System API to use C instead of C++
- Add new calls in Thread.h
- Documented code.
Kernel:
- Rework handover stage, separated the Processor specific code from
the cross platform code.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/KernelKit')
| -rw-r--r-- | Private/KernelKit/DriveManager.hxx | 7 | ||||
| -rw-r--r-- | Private/KernelKit/FileManager.hpp | 7 | ||||
| -rw-r--r-- | Private/KernelKit/ProcessScheduler.hpp | 23 |
3 files changed, 24 insertions, 13 deletions
diff --git a/Private/KernelKit/DriveManager.hxx b/Private/KernelKit/DriveManager.hxx index bec490d9..8d0289aa 100644 --- a/Private/KernelKit/DriveManager.hxx +++ b/Private/KernelKit/DriveManager.hxx @@ -24,6 +24,7 @@ enum { kMassStorage = 0xDA, kFloppyDisc = 0xCD, kOpticalDisc = 0xDC, // CD-ROM/DVD-ROM/Blu-Ray + /// combine with below. kReadOnly = 0x10, // Read only drive kEPMDrive = 0x11, // Explicit Partition Map. kEPTDrive = 0x12, // ESP w/ EPM partition. @@ -42,10 +43,10 @@ struct DriveTrait final { /// @brief Packet drive (StorageKit compilant.) struct DrivePacket final { - VoidPtr fPacketContent; // packet body. + VoidPtr fPacketContent; //! packet body. Char fPacketMime[kDriveNameLen]; //! identify what we're sending. - SizeT fPacketSize; // packet size - UInt32 fPacketCRC32; // sanity crc, in case if good is set to false + SizeT fPacketSize; //! packet size + UInt32 fPacketCRC32; //! sanity crc, in case if good is set to false Boolean fPacketGood; } fPacket; diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp index d02c087c..87de3d9e 100644 --- a/Private/KernelKit/FileManager.hpp +++ b/Private/KernelKit/FileManager.hpp @@ -18,13 +18,18 @@ #include <FSKit/NewFS.hxx> #endif // __FSKIT_NEWFS__ +#ifdef __FSKIT_HCFS__ +#include <FSKit/HCFS.hxx> +#endif // __FSKIT_HCFS__ + #include <CompilerKit/CompilerKit.hxx> #include <HintKit/CompilerHint.hxx> #include <NewKit/ErrorID.hpp> #include <NewKit/Ref.hpp> #include <NewKit/Stream.hpp> -/// Main filesystem abstraction manager. +/// @brief Filesystem abstraction manager. +/// Works like the VFS or IFS. #define kBootFolder "/Boot" #define kBinFolder "/Applications" diff --git a/Private/KernelKit/ProcessScheduler.hpp b/Private/KernelKit/ProcessScheduler.hpp index 4f499033..1b55be4a 100644 --- a/Private/KernelKit/ProcessScheduler.hpp +++ b/Private/KernelKit/ProcessScheduler.hpp @@ -121,7 +121,7 @@ class ProcessHeader final { HCORE_COPY_DEFAULT(ProcessHeader) public: - void SetStart(UIntPtr &imageStart) noexcept; + void SetEntrypoint(UIntPtr &imageStart) noexcept; public: Char Name[kProcessLen] = {"HCore Process"}; @@ -141,22 +141,27 @@ class ProcessHeader final { SizeT FreeMemory{0}; enum { - ExecutableType, - DLLType, - DriverType, - TypeCount, + kUserKind = 3, + kLibKind = 3, + kDriverKind = 0, + kKindCount, + }; + + enum { + kRingUserKind = 3, + kRingDriverKind = 0, }; ProcessTime PTime; - PID ProcessId{-1}; - Int32 Ring{3}; - Int32 Kind{0}; + PID ProcessId{kPIDInvalid}; + Int32 Ring{kRingDriverKind}; + Int32 Kind{kUserKind}; public: //! @brief boolean operator, check status. operator bool() { return Status != ProcessStatus::kDead; } - //! @brief Crash app, exits with code ~0. + //! @brief Crash the app, exits with code ~0. void Crash(); //! @brief Exits app. |
