summaryrefslogtreecommitdiffhomepage
path: root/SDK/Library/CoreSystem/Sources
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-12 09:57:37 +0200
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-12 09:57:37 +0200
commit4e4f9e871236067f0cda4b67a732d3b3bbf08884 (patch)
tree3075fccf13c15bb71b022038d293e15b8020a580 /SDK/Library/CoreSystem/Sources
parentbc57a29a24b98b00ba17710ba84ec2188ab73504 (diff)
MHR-23: Update CoreSystem prefix from CA_ to CS_.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'SDK/Library/CoreSystem/Sources')
-rw-r--r--SDK/Library/CoreSystem/Sources/App.c8
-rw-r--r--SDK/Library/CoreSystem/Sources/File.c12
-rw-r--r--SDK/Library/CoreSystem/Sources/Heap.c28
-rw-r--r--SDK/Library/CoreSystem/Sources/Math.c2
-rw-r--r--SDK/Library/CoreSystem/Sources/Thread.c9
5 files changed, 34 insertions, 25 deletions
diff --git a/SDK/Library/CoreSystem/Sources/App.c b/SDK/Library/CoreSystem/Sources/App.c
index 6c6f22f3..c13e9112 100644
--- a/SDK/Library/CoreSystem/Sources/App.c
+++ b/SDK/Library/CoreSystem/Sources/App.c
@@ -12,9 +12,9 @@ ApplicationInterfaceRef kSharedApplication = NullPtr;
/// @brief Gets the app arguments count.
/// @param void no arguments.
/// @return The number of arguments given to the application.
-CA_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
+CS_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
{
- CA_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(kSharedApplication);
return kSharedApplication->Invoke(kSharedApplication, kCallGetArgsCount);
}
@@ -22,9 +22,9 @@ CA_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
/// @brief Gets the app arguments pointer.
/// @param void no arguments.
/// @return
-CA_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType)
+CS_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType)
{
- CA_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(kSharedApplication);
return (CharacterTypeUTF8**)kSharedApplication->Invoke(kSharedApplication,
kCallGetArgsPtr);
diff --git a/SDK/Library/CoreSystem/Sources/File.c b/SDK/Library/CoreSystem/Sources/File.c
index 6488bccf..bd955abb 100644
--- a/SDK/Library/CoreSystem/Sources/File.c
+++ b/SDK/Library/CoreSystem/Sources/File.c
@@ -20,12 +20,12 @@ enum FileOp
/// @param path where to find it.
/// @param rest the restrict (rw, rwe, r+, w+, r, w)
/// @return FSRef the file.
-CA_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path,
+CS_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path,
const CharacterTypeUTF8* rest)
{
- CA_MUST_PASS(kSharedApplication);
- CA_MUST_PASS(path && FsIsValidPath(path) == Yes);
- CA_MUST_PASS(rest);
+ CS_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(path && FsIsValidPath(path) == Yes);
+ CS_MUST_PASS(rest);
return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path,
rest);
@@ -34,9 +34,9 @@ CA_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path,
/// @brief Closes the file and flushes it to the said file.
/// @param refFs the filesystem reference.
/// @return
-CA_EXTERN_C VoidType FsCloseFile(FSRef refFs)
+CS_EXTERN_C VoidType FsCloseFile(FSRef refFs)
{
- CA_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(kSharedApplication);
kSharedApplication->Invoke(kSharedApplication, refFs, kFlushFile);
kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refFs);
diff --git a/SDK/Library/CoreSystem/Sources/Heap.c b/SDK/Library/CoreSystem/Sources/Heap.c
index f3e9f914..9f2c167d 100644
--- a/SDK/Library/CoreSystem/Sources/Heap.c
+++ b/SDK/Library/CoreSystem/Sources/Heap.c
@@ -11,11 +11,11 @@
/// @param sz size of object.
/// @param flags flags.
/// @return
-CA_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz, DWordType flags)
+CS_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz, DWordType flags)
{
- CA_MUST_PASS(kSharedApplication);
- CA_MUST_PASS(sz);
- CA_MUST_PASS(flags);
+ CS_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(sz);
+ CS_MUST_PASS(flags);
return (PtrVoidType)kSharedApplication->Invoke(kSharedApplication,
kCallAllocPtr, sz, flags);
@@ -23,33 +23,33 @@ CA_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz, DWordType flags)
/// @brief Free pointer from the user's heap.
/// @param ptr the pointer to free.
-CA_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr)
+CS_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr)
{
- CA_MUST_PASS(kSharedApplication);
- CA_MUST_PASS(ptr);
+ CS_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(ptr);
- CA_UNREFERENCED_PARAMETER(
+ CS_UNREFERENCED_PARAMETER(
kSharedApplication->Invoke(kSharedApplication, kCallFreePtr, ptr));
}
/// @brief Get pointer size.
/// @param ptr the pointer to find.
/// @return the size.
-CA_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr)
+CS_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr)
{
- CA_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(kSharedApplication);
- CA_MUST_PASS(ptr);
+ CS_MUST_PASS(ptr);
return kSharedApplication->Invoke(kSharedApplication, kCallSizePtr, ptr);
}
/// @brief Check if the pointer exists.
/// @param ptr the pointer to check.
/// @return if it exists
-CA_EXTERN_C BooleanType RtHeapPtrExists(PtrVoidType ptr)
+CS_EXTERN_C BooleanType RtHeapPtrExists(PtrVoidType ptr)
{
- CA_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(kSharedApplication);
- CA_MUST_PASS(ptr);
+ CS_MUST_PASS(ptr);
return kSharedApplication->Invoke(kSharedApplication, kCallCheckPtr, ptr);
}
diff --git a/SDK/Library/CoreSystem/Sources/Math.c b/SDK/Library/CoreSystem/Sources/Math.c
index b41f8a54..2a17b3dc 100644
--- a/SDK/Library/CoreSystem/Sources/Math.c
+++ b/SDK/Library/CoreSystem/Sources/Math.c
@@ -8,7 +8,7 @@
/// @brief Number generator helper.
/// @return Random generated number.
-CA_EXTERN_C SizeType MathRand(VoidType)
+CS_EXTERN_C SizeType MathRand(VoidType)
{
return kSharedApplication->Invoke(kSharedApplication, kCallRandomNumberGenerator);
} \ No newline at end of file
diff --git a/SDK/Library/CoreSystem/Sources/Thread.c b/SDK/Library/CoreSystem/Sources/Thread.c
new file mode 100644
index 00000000..0f724d58
--- /dev/null
+++ b/SDK/Library/CoreSystem/Sources/Thread.c
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#include <Headers/Thread.h>
+
+ThreadRef kMainThread = 0;