summaryrefslogtreecommitdiffhomepage
path: root/src/kernel
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-18 11:50:52 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-18 11:50:52 +0100
commit465a99f17f9e8f56813f225f09a6a1a498be9deb (patch)
tree5f11d762da993a0912ff9dbf547b2f871940a30c /src/kernel
parent6f367a0347d314c367054071c5abaf92aa9b7d49 (diff)
chore: kernel: codebase improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/KernelKit/MSDOS.h6
-rw-r--r--src/kernel/KernelKit/PE.h6
-rw-r--r--src/kernel/KernelKit/PE32CodeMgr.h2
-rw-r--r--src/kernel/KernelKit/PEF.h6
-rw-r--r--src/kernel/KernelKit/PEFCodeMgr.h8
-rw-r--r--src/kernel/KernelKit/Semaphore.h6
-rw-r--r--src/kernel/KernelKit/ThreadLocalStorage.h6
-rw-r--r--src/kernel/KernelKit/ThreadLocalStorage.inl14
-rw-r--r--src/kernel/KernelKit/Timer.h6
-rw-r--r--src/kernel/KernelKit/TraceSrv.h6
-rw-r--r--src/kernel/KernelKit/UserMgr.h6
-rw-r--r--src/kernel/KernelKit/UserProcessScheduler.h2
-rw-r--r--src/kernel/KernelKit/UserProcessScheduler.inl4
-rw-r--r--src/kernel/KernelKit/XCOFF.h6
14 files changed, 42 insertions, 42 deletions
diff --git a/src/kernel/KernelKit/MSDOS.h b/src/kernel/KernelKit/MSDOS.h
index 03f1b3ff..7c696607 100644
--- a/src/kernel/KernelKit/MSDOS.h
+++ b/src/kernel/KernelKit/MSDOS.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNEL_KIT_MSDOS_H__
-#define __KERNEL_KIT_MSDOS_H__
+#ifndef KERNEL_KIT_MSDOS_H
+#define KERNEL_KIT_MSDOS_H
#include <KernelKit/PE.h>
#include <NeKit/Config.h>
@@ -39,4 +39,4 @@ typedef struct _DosHeader {
DosLong eLfanew;
} DosHeader, *DosHeaderPtr;
-#endif /* ifndef __KERNEL_KIT_MSDOS_H__ */
+#endif /* ifndef KERNEL_KIT_MSDOS_H */
diff --git a/src/kernel/KernelKit/PE.h b/src/kernel/KernelKit/PE.h
index bef39481..446522bd 100644
--- a/src/kernel/KernelKit/PE.h
+++ b/src/kernel/KernelKit/PE.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNELKIT_INC_PE_H__
-#define __KERNELKIT_INC_PE_H__
+#ifndef KERNELKIT_INC_PE_H
+#define KERNELKIT_INC_PE_H
#include <NeKit/Config.h>
@@ -120,4 +120,4 @@ enum {
kPEResourceId = 0xFFaadd00,
};
-#endif /* ifndef __KERNELKIT_INC_PE_H__ */
+#endif /* ifndef KERNELKIT_INC_PE_H */
diff --git a/src/kernel/KernelKit/PE32CodeMgr.h b/src/kernel/KernelKit/PE32CodeMgr.h
index 3a3ea6f3..9b47a77f 100644
--- a/src/kernel/KernelKit/PE32CodeMgr.h
+++ b/src/kernel/KernelKit/PE32CodeMgr.h
@@ -17,7 +17,7 @@
#include <NeKit/ErrorOr.h>
#include <NeKit/KString.h>
-#ifndef __KERNEL_KIT_USER_PROCESS_SCHEDULER_H__
+#ifndef KERNELKIT_USERPROCESSSCHEDULER_H
#include <KernelKit/ProcessScheduler.h>
#endif
diff --git a/src/kernel/KernelKit/PEF.h b/src/kernel/KernelKit/PEF.h
index 7f6a90ab..22360212 100644
--- a/src/kernel/KernelKit/PEF.h
+++ b/src/kernel/KernelKit/PEF.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNELKIT_PEF_H__
-#define __KERNELKIT_PEF_H__
+#ifndef KERNELKIT_PEF_H
+#define KERNELKIT_PEF_H
#include <CompilerKit/CompilerKit.h>
#include <KernelKit/ILoader.h>
@@ -105,4 +105,4 @@ enum {
};
} // namespace Kernel
-#endif /* ifndef __KERNELKIT_PEF_H__ */
+#endif /* ifndef KERNELKIT_PEF_H */
diff --git a/src/kernel/KernelKit/PEFCodeMgr.h b/src/kernel/KernelKit/PEFCodeMgr.h
index 7bdf4d2d..9616e7b7 100644
--- a/src/kernel/KernelKit/PEFCodeMgr.h
+++ b/src/kernel/KernelKit/PEFCodeMgr.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef _INC_CODE_MANAGER_PEF_H_
-#define _INC_CODE_MANAGER_PEF_H_
+#ifndef KERNELKIT_CODEMGR_PEF_H
+#define KERNELKIT_CODEMGR_PEF_H
/// @file PEFCodeMgr.h
/// @brief PEF Code Manager header file.
@@ -14,7 +14,7 @@
#include <NeKit/ErrorOr.h>
#include <NeKit/KString.h>
-#ifndef __KERNEL_KIT_USER_PROCESS_SCHEDULER_H__
+#ifndef KERNELKIT_USERPROCESSSCHEDULER_H
#include <KernelKit/ProcessScheduler.h>
#endif
@@ -69,4 +69,4 @@ ProcessID rtl_create_user_process(PEFLoader& exec, const UserProcess::Executable
} // namespace Kernel
-#endif // ifndef _INC_CODE_MANAGER_PEF_H_
+#endif // ifndef KERNELKIT_CODEMGR_PEF_H
diff --git a/src/kernel/KernelKit/Semaphore.h b/src/kernel/KernelKit/Semaphore.h
index 601235a8..6fafc88b 100644
--- a/src/kernel/KernelKit/Semaphore.h
+++ b/src/kernel/KernelKit/Semaphore.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNEL_KIT_TLS_H__
-#define __KERNEL_KIT_TLS_H__
+#ifndef KERNELKIT_TLS_H
+#define KERNELKIT_TLS_H
/// @author Amlal El Mahrouss
/// @file Semaphore.h
@@ -108,4 +108,4 @@ inline bool rtl_sem_wait(SemaphoreArr& sem, const UInt64 owner, const UInt64 tim
}
} // namespace Kernel
-#endif // !__KERNEL_KIT_TLS_H__ \ No newline at end of file
+#endif // !KERNELKIT_TLS_H \ No newline at end of file
diff --git a/src/kernel/KernelKit/ThreadLocalStorage.h b/src/kernel/KernelKit/ThreadLocalStorage.h
index 62b0abbc..f2d891ab 100644
--- a/src/kernel/KernelKit/ThreadLocalStorage.h
+++ b/src/kernel/KernelKit/ThreadLocalStorage.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNEL_KIT_TLS_H__
-#define __KERNEL_KIT_TLS_H__
+#ifndef KERNELKIT_TLS_H
+#define KERNELKIT_TLS_H
#include <NeKit/Config.h>
#include <NeKit/ErrorOr.h>
@@ -63,4 +63,4 @@ EXTERN_C Kernel::Bool tls_check_syscall_impl(Kernel::VoidPtr TIB);
// last rev 7/7/24
-#endif /* ifndef __KERNEL_KIT_TLS_H__ */
+#endif /* ifndef KERNELKIT_TLS_H */
diff --git a/src/kernel/KernelKit/ThreadLocalStorage.inl b/src/kernel/KernelKit/ThreadLocalStorage.inl
index 30d81e8d..2da27ecd 100644
--- a/src/kernel/KernelKit/ThreadLocalStorage.inl
+++ b/src/kernel/KernelKit/ThreadLocalStorage.inl
@@ -5,11 +5,11 @@
//! @file ThreadLocalStorage.inl
//! @brief Allocate resources from the process's heap storage.
-#ifndef __KERNEL_KIT_USER_PROCESS_SCHEDULER_H__
+#ifndef KERNELKIT_USERPROCESSSCHEDULER_H
#include <KernelKit/ProcessScheduler.h>
#endif
-template <typename T>
+template <class T>
inline T* tls_new_ptr(void) {
using namespace Kernel;
@@ -24,7 +24,7 @@ inline T* tls_new_ptr(void) {
//! @brief Delete process pointer.
//! @param obj The pointer to delete.
-template <typename T>
+template <class T>
inline Kernel::Bool tls_delete_ptr(T* obj) {
using namespace Kernel;
@@ -39,14 +39,14 @@ inline Kernel::Bool tls_delete_ptr(T* obj) {
//! @brief Delete process pointer.
//! @param obj The pointer to delete.
-template <typename T>
+template <class T>
inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T> obj) {
return tls_delete_ptr(obj.Leak());
}
//! @brief Delete process pointer.
//! @param obj The pointer to delete.
-template <typename T>
+template <class T>
inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T*> obj) {
return tls_delete_ptr(obj->Leak());
}
@@ -56,7 +56,7 @@ inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T*> obj) {
/// @tparam ...Args varg class type.
/// @param args arguments list.
/// @return Class instance.
-template <typename T, typename... Args>
+template <class T, class... Args>
T* tls_new_class(Args&&... args) {
using namespace Kernel;
@@ -74,7 +74,7 @@ T* tls_new_class(Args&&... args) {
/// @tparam T
/// @param obj
/// @return
-template <typename T>
+template <class T>
inline Kernel::Bool tls_delete_class(T* obj) {
using namespace Kernel;
diff --git a/src/kernel/KernelKit/Timer.h b/src/kernel/KernelKit/Timer.h
index 6948be6e..02fe5665 100644
--- a/src/kernel/KernelKit/Timer.h
+++ b/src/kernel/KernelKit/Timer.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNEL_KIT_TIMER_H__
-#define __KERNEL_KIT_TIMER_H__
+#ifndef KERNELKIT_TIMER_H
+#define KERNELKIT_TIMER_H
#include <ArchKit/ArchKit.h>
#include <KernelKit/KPC.h>
@@ -70,4 +70,4 @@ inline constexpr UInt64 rtl_milliseconds(UInt64 time) {
}
} // namespace Kernel
-#endif // !__KERNEL_KIT_TIMER_H__
+#endif // !KERNELKIT_TIMER_H
diff --git a/src/kernel/KernelKit/TraceSrv.h b/src/kernel/KernelKit/TraceSrv.h
index 3294d9be..79fbd7da 100644
--- a/src/kernel/KernelKit/TraceSrv.h
+++ b/src/kernel/KernelKit/TraceSrv.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNELKIT_TRACESRV_H__
-#define __KERNELKIT_TRACESRV_H__
+#ifndef KERNELKIT_TRACESRV_H
+#define KERNELKIT_TRACESRV_H
#include <CompilerKit/CompilerKit.h>
@@ -23,4 +23,4 @@ namespace TraceSrv {
} // namespace Kernel
-#endif // !__KERNELKIT_TRACESRV_H__
+#endif // !KERNELKIT_TRACESRV_H
diff --git a/src/kernel/KernelKit/UserMgr.h b/src/kernel/KernelKit/UserMgr.h
index 100803ec..e622c376 100644
--- a/src/kernel/KernelKit/UserMgr.h
+++ b/src/kernel/KernelKit/UserMgr.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef __KERNEL_KIT_USER_MGR_H__
-#define __KERNEL_KIT_USER_MGR_H__
+#ifndef KERNELKIT_USERMGR_H
+#define KERNELKIT_USERMGR_H
/* ========================================
@@ -96,4 +96,4 @@ inline User* kCurrentUser = nullptr;
inline User* kRootUser = nullptr;
} // namespace Kernel
-#endif /* ifndef __KERNEL_KIT_USER_MGR_H__ */
+#endif /* ifndef KERNELKIT_USERMGR_H */
diff --git a/src/kernel/KernelKit/UserProcessScheduler.h b/src/kernel/KernelKit/UserProcessScheduler.h
index 2271002c..b91ceb92 100644
--- a/src/kernel/KernelKit/UserProcessScheduler.h
+++ b/src/kernel/KernelKit/UserProcessScheduler.h
@@ -277,4 +277,4 @@ class UserProcessHelper final {
// END
////////////////////////////////////////////////////
-#endif /* ifndef __KERNEL_KIT_USER_PROCESS_SCHEDULER_H__ */
+#endif /* ifndef KERNELKIT_USERPROCESSSCHEDULER_H */
diff --git a/src/kernel/KernelKit/UserProcessScheduler.inl b/src/kernel/KernelKit/UserProcessScheduler.inl
index e9cf3135..cac796c9 100644
--- a/src/kernel/KernelKit/UserProcessScheduler.inl
+++ b/src/kernel/KernelKit/UserProcessScheduler.inl
@@ -11,9 +11,9 @@
/// @author Amlal El Mahrouss (amlal@nekernel.org)
/// @date Tue Apr 22 22:01:07 CEST 2025
-#ifndef __KERNEL_KIT_USER_PROCESS_SCHEDULER_H__
+#ifndef KERNELKIT_USERPROCESSSCHEDULER_H
#include <KernelKit/UserProcessScheduler.h>
-#endif // __KERNEL_KIT_USER_PROCESS_SCHEDULER_H__
+#endif // KERNELKIT_USERPROCESSSCHEDULER_H
namespace Kernel {
/***********************************************************************************/
diff --git a/src/kernel/KernelKit/XCOFF.h b/src/kernel/KernelKit/XCOFF.h
index 2bd486f0..61ceb4c0 100644
--- a/src/kernel/KernelKit/XCOFF.h
+++ b/src/kernel/KernelKit/XCOFF.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef INC_XOCFF_H
-#define INC_XOCFF_H
+#ifndef KERNELKIT_XCOFF_H
+#define KERNELKIT_XCOFF_H
#include <NeKit/Config.h>
@@ -39,4 +39,4 @@ typedef struct XCOFF_FORK_HEADER {
Kernel::Char fCodeSignFork[kXCOFF64ForkNameLen];
} XCOFF_FORK_HEADER;
-#endif // ifndef INC_XOCFF_H
+#endif // ifndef KERNELKIT_XCOFF_H