summaryrefslogtreecommitdiffhomepage
path: root/Kernel/KernelKit
diff options
context:
space:
mode:
authorAmlal <amlal@zka.com>2024-07-20 08:43:16 +0200
committerAmlal <amlal@zka.com>2024-07-20 08:43:16 +0200
commit650fee520f526d9cd5ffa75735bd94d5140dd247 (patch)
tree5967c57a2e754c0f46bccfba40a915a680dcaa10 /Kernel/KernelKit
parent81b284cacb03b34ae259c485ac874b02c8ecba69 (diff)
[IMP] See below.
- Revoke OTA flag for now inside bootloader (newosldr #4) - Rework Comm as SCI (System Call Interface) (newoskrnl #3) - Rework and fix some parts of the scheduler (newoskrnl #2) - Return from thread when region is zero (newosldr #1) - Separate allocation functions and c++ runtime from each other. (DDK #5) - Rename kHartStandard to kStandard (newoskrnl #6) Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Kernel/KernelKit')
-rw-r--r--Kernel/KernelKit/ProcessHeap.hxx2
-rw-r--r--Kernel/KernelKit/ProcessScheduler.hxx24
-rw-r--r--Kernel/KernelKit/RLE.hxx3
3 files changed, 18 insertions, 11 deletions
diff --git a/Kernel/KernelKit/ProcessHeap.hxx b/Kernel/KernelKit/ProcessHeap.hxx
index 677aa835..d2ec4035 100644
--- a/Kernel/KernelKit/ProcessHeap.hxx
+++ b/Kernel/KernelKit/ProcessHeap.hxx
@@ -15,7 +15,7 @@
/// @version 5/11/23
/// @file ProcessHeap.hxx
-/// @brief memory heap for user processes.
+/// @brief Heap for user processes.
#define kUserHeapMaxSz (4096)
#define kUserHeapMag (0xFAF0FEF0)
diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx
index cbce2ec2..3f6e7828 100644
--- a/Kernel/KernelKit/ProcessScheduler.hxx
+++ b/Kernel/KernelKit/ProcessScheduler.hxx
@@ -13,7 +13,7 @@
#include <KernelKit/ProcessHeap.hxx>
#include <NewKit/MutableArray.hpp>
-#define kSchedMinMicroTime (AffinityKind::kHartStandard)
+#define kSchedMinMicroTime (AffinityKind::kStandard)
#define kSchedInvalidPID (-1)
#define kSchedProcessLimitPerTeam (16U)
@@ -58,7 +58,7 @@ namespace Kernel
kInvalid = 300,
kVeryHigh = 250,
kHigh = 200,
- kHartStandard = 150,
+ kStandard = 150,
kLowUsage = 100,
kVeryLowUsage = 50,
};
@@ -167,7 +167,7 @@ namespace Kernel
kKindCount,
};
- ProcessTime PTime;
+ ProcessTime PTime{0};
PID ProcessId{kSchedInvalidPID};
Int32 Kind{kAppKind};
@@ -178,25 +178,29 @@ namespace Kernel
return Status != ProcessStatus::kDead;
}
- //! @brief Crash the app, exits with code ~0.
+ ///! @brief Crashes the app, exits with code ~0.
Void Crash();
- //! @brief Exits app.
+ ///! @brief Exits the app.
Void Exit(Int32 exitCode = 0);
- //! @brief TLS Allocate
+ ///! @brief TLS allocate.
+ ///! @param sz size of new ptr.
VoidPtr New(const SizeT& sz);
- //! @brief TLS Free.
+ ///! @brief TLS free.
+ ///! @param ptr the pointer to free.
+ ///! @param sz the size of it.
Boolean Delete(VoidPtr ptr, const SizeT& sz);
- //! @brief Wakes up threads.
+ ///! @brief Wakes up threads.
Void Wake(const bool wakeup = false);
// ProcessHeader getters.
public:
- //! @brief ProcessHeader name getter, example: "C RunTime"
- const Char* GetName() noexcept;
+ ///! @brief Get the process's name
+ ///! @example 'C Runtime Library'
+ const Char* GetProcessName() noexcept;
//! @brief return local error code of process.
//! @return Int32 local error code.
diff --git a/Kernel/KernelKit/RLE.hxx b/Kernel/KernelKit/RLE.hxx
index e43d2462..9256c23b 100644
--- a/Kernel/KernelKit/RLE.hxx
+++ b/Kernel/KernelKit/RLE.hxx
@@ -9,4 +9,7 @@
#include <NewKit/Defines.hpp>
+EXTERN_C void rle_compress(void* data, long sz, void* out, long out_sz);
+EXTERN_C void rle_decompress(void* data, long sz, void* out, long out_sz);
+
#endif // !ifndef __KERNELKIT_RLE_HXX__