summaryrefslogtreecommitdiffhomepage
path: root/dev/libSystem
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-30 16:48:00 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-30 16:48:00 +0200
commitbaaa09cefe3ed0f2bbf9d93e07d55e60a04ca17f (patch)
tree45ef9414c87c32eb84b563441a416ca3906fd7c1 /dev/libSystem
parent86b89793dcaf290206faeb7fe3100dd0a5f71d1d (diff)
refactor: Format codebase and fix warning in UserProcessScheduler.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/libSystem')
-rw-r--r--dev/libSystem/SystemKit/Jail.h3
-rw-r--r--dev/libSystem/SystemKit/Macros.h8
-rw-r--r--dev/libSystem/SystemKit/Syscall.h4
-rw-r--r--dev/libSystem/SystemKit/System.h4
-rw-r--r--dev/libSystem/src/SystemImpl.cc15
5 files changed, 18 insertions, 16 deletions
diff --git a/dev/libSystem/SystemKit/Jail.h b/dev/libSystem/SystemKit/Jail.h
index 93734dcf..998173f9 100644
--- a/dev/libSystem/SystemKit/Jail.h
+++ b/dev/libSystem/SystemKit/Jail.h
@@ -15,8 +15,7 @@ struct JAIL_INFO;
struct JAIL;
/// @brief Jail information (client side struct)
-struct JAIL_INFO
-{
+struct JAIL_INFO {
SInt32 fParentID;
SInt32 fJailHash;
SInt64 fACL;
diff --git a/dev/libSystem/SystemKit/Macros.h b/dev/libSystem/SystemKit/Macros.h
index 48c586cc..2bdeff9d 100644
--- a/dev/libSystem/SystemKit/Macros.h
+++ b/dev/libSystem/SystemKit/Macros.h
@@ -64,19 +64,19 @@ typedef char Char;
typedef decltype(nullptr) nullPtr;
typedef nullPtr NullPtr;
-#define LIBSYS_COPY_DELETE(KLASS) \
+#define LIBSYS_COPY_DELETE(KLASS) \
KLASS& operator=(const KLASS&) = delete; \
KLASS(const KLASS&) = delete;
-#define LIBSYS_COPY_DEFAULT(KLASS) \
+#define LIBSYS_COPY_DEFAULT(KLASS) \
KLASS& operator=(const KLASS&) = default; \
KLASS(const KLASS&) = default;
-#define LIBSYS_MOVE_DELETE(KLASS) \
+#define LIBSYS_MOVE_DELETE(KLASS) \
KLASS& operator=(KLASS&&) = delete; \
KLASS(KLASS&&) = delete;
-#define LIBSYS_MOVE_DEFAULT(KLASS) \
+#define LIBSYS_MOVE_DEFAULT(KLASS) \
KLASS& operator=(KLASS&&) = default; \
KLASS(KLASS&&) = default;
diff --git a/dev/libSystem/SystemKit/Syscall.h b/dev/libSystem/SystemKit/Syscall.h
index 1a334ead..436665ae 100644
--- a/dev/libSystem/SystemKit/Syscall.h
+++ b/dev/libSystem/SystemKit/Syscall.h
@@ -10,8 +10,8 @@
#include <cstdarg>
#ifndef SYSCALL_HASH
-#define SYSCALL_HASH(str) (UInt64)str
-#endif // !SYSCALL_HASH
+#define SYSCALL_HASH(str) (UInt64) str
+#endif // !SYSCALL_HASH
IMPORT_C VoidPtr libsys_syscall_arg_1(SizeT id);
IMPORT_C VoidPtr libsys_syscall_arg_2(SizeT id, VoidPtr arg1);
diff --git a/dev/libSystem/SystemKit/System.h b/dev/libSystem/SystemKit/System.h
index b3d10e32..91899efe 100644
--- a/dev/libSystem/SystemKit/System.h
+++ b/dev/libSystem/SystemKit/System.h
@@ -17,8 +17,8 @@ Purpose: System Call Interface.
// ------------------------------------------------------------------------------------------ //
struct REF_TYPE {
- UInt64 __hash; /// @brief Hash of the syscall
- VoidPtr __self; /// @brief Syscall self value.
+ UInt64 __hash; /// @brief Hash of the syscall
+ VoidPtr __self; /// @brief Syscall self value.
};
typedef REF_TYPE* Ref;
diff --git a/dev/libSystem/src/SystemImpl.cc b/dev/libSystem/src/SystemImpl.cc
index 6c2201fe..d0682830 100644
--- a/dev/libSystem/src/SystemImpl.cc
+++ b/dev/libSystem/src/SystemImpl.cc
@@ -47,8 +47,9 @@ IMPORT_C VoidPtr MmFillMemory(_Input VoidPtr dest, _Input SizeT len, _Input UInt
}
IMPORT_C Ref IoOpenFile(_Input const Char* path, _Input const Char* drv_letter) {
- return (Ref)libsys_syscall_arg_3(SYSCALL_HASH('IoOpenFile'), reinterpret_cast<VoidPtr>(const_cast<Char*>(path)),
- reinterpret_cast<VoidPtr>(const_cast<Char*>(drv_letter)));
+ return (Ref) libsys_syscall_arg_3(SYSCALL_HASH('IoOpenFile'),
+ reinterpret_cast<VoidPtr>(const_cast<Char*>(path)),
+ reinterpret_cast<VoidPtr>(const_cast<Char*>(drv_letter)));
}
IMPORT_C Void IoCloseFile(_Input Ref desc) {
@@ -56,15 +57,16 @@ IMPORT_C Void IoCloseFile(_Input Ref desc) {
}
IMPORT_C UInt64 IoSeekFile(_Input Ref desc, _Input UInt64 off) {
- auto ret = (volatile UInt64*) libsys_syscall_arg_3(SYSCALL_HASH('IoSeekFile'), reinterpret_cast<VoidPtr>(desc),
- reinterpret_cast<VoidPtr>(&off));
+ auto ret = (volatile UInt64*) libsys_syscall_arg_3(
+ SYSCALL_HASH('IoSeekFile'), reinterpret_cast<VoidPtr>(desc), reinterpret_cast<VoidPtr>(&off));
MUST_PASS((*ret) != ~0UL);
return *ret;
}
IMPORT_C UInt64 IoTellFile(_Input Ref desc) {
- auto ret = (volatile UInt64*) libsys_syscall_arg_2(SYSCALL_HASH('IoTellFile'), reinterpret_cast<VoidPtr>(desc));
+ auto ret = (volatile UInt64*) libsys_syscall_arg_2(SYSCALL_HASH('IoTellFile'),
+ reinterpret_cast<VoidPtr>(desc));
return *ret;
}
@@ -74,7 +76,8 @@ IMPORT_C SInt32 PrintOut(_Input IORef desc, const char* fmt, ...) {
va_start(args, fmt);
auto ret = (volatile UInt64*) libsys_syscall_arg_4(
- SYSCALL_HASH('PrintOut'), reinterpret_cast<VoidPtr>(desc), reinterpret_cast<VoidPtr>(const_cast<Char*>(fmt)), args);
+ SYSCALL_HASH('PrintOut'), reinterpret_cast<VoidPtr>(desc),
+ reinterpret_cast<VoidPtr>(const_cast<Char*>(fmt)), args);
va_end(args);