summaryrefslogtreecommitdiffhomepage
path: root/Private/ArchKit/ArchKit.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-05 21:10:18 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-05 21:10:18 +0200
commitf95d8bf159d10b5a9521dcaa0bc37aa0e9dfc02b (patch)
treebf8186f1a0521a64983bb0bca4f7b54883542195 /Private/ArchKit/ArchKit.hpp
parent5a903c1d8f80ca8d7bc5fbea0aea710ce0133f9d (diff)
MHR-23: Add run_format.sh, kernel patches.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/ArchKit/ArchKit.hpp')
-rw-r--r--Private/ArchKit/ArchKit.hpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/Private/ArchKit/ArchKit.hpp b/Private/ArchKit/ArchKit.hpp
index f4654012..be155385 100644
--- a/Private/ArchKit/ArchKit.hpp
+++ b/Private/ArchKit/ArchKit.hpp
@@ -20,26 +20,29 @@
#error Unknown architecture
#endif
-namespace NewOS {
-constexpr static inline SSizeT rt_hash_seed(const char *seed, int mul) {
- SSizeT hash = 0;
-
- for (SSizeT idx = 0; seed[idx] != 0; ++idx) {
- hash += seed[idx];
- hash ^= mul;
- }
-
- return hash;
-}
-} // namespace NewOS
+namespace NewOS
+{
+ constexpr static inline SSizeT rt_hash_seed(const char* seed, int mul)
+ {
+ SSizeT hash = 0;
+
+ for (SSizeT idx = 0; seed[idx] != 0; ++idx)
+ {
+ hash += seed[idx];
+ hash ^= mul;
+ }
+
+ return hash;
+ }
+} // namespace NewOS
#define kKernelMaxSystemCalls (256)
typedef NewOS::Void (*rt_syscall_proc)(NewOS::HAL::StackFramePtr);
extern NewOS::Array<rt_syscall_proc,
- kKernelMaxSystemCalls>
- kSyscalls;
+ kKernelMaxSystemCalls>
+ kSyscalls;
EXTERN_C NewOS::HAL::StackFramePtr rt_get_current_context();
EXTERN_C NewOS::Void rt_do_context_switch(NewOS::HAL::StackFramePtr stackFrame);