summaryrefslogtreecommitdiffhomepage
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
parentbc57a29a24b98b00ba17710ba84ec2188ab73504 (diff)
MHR-23: Update CoreSystem prefix from CA_ to CS_.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
-rw-r--r--.vscode/c_cpp_properties.json12
-rw-r--r--SDK/Library/CorePEFRuntime/Sources/PEFStart.c6
-rw-r--r--SDK/Library/CoreSystem/Headers/Alert.h6
-rw-r--r--SDK/Library/CoreSystem/Headers/Defines.h60
-rw-r--r--SDK/Library/CoreSystem/Headers/File.h18
-rw-r--r--SDK/Library/CoreSystem/Headers/Heap.h10
-rw-r--r--SDK/Library/CoreSystem/Headers/Intl.h4
-rw-r--r--SDK/Library/CoreSystem/Headers/Math.h10
-rw-r--r--SDK/Library/CoreSystem/Headers/Rsrc.h3
-rw-r--r--SDK/Library/CoreSystem/Headers/Thread.h10
-rw-r--r--SDK/Library/CoreSystem/Headers/Transport.h22
-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
16 files changed, 128 insertions, 92 deletions
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
index 77e838f7..cda7d4a1 100644
--- a/.vscode/c_cpp_properties.json
+++ b/.vscode/c_cpp_properties.json
@@ -4,9 +4,9 @@
"name": "MicroKernel (Macintosh)",
"includePath": [
"${workspaceFolder}/Kernel/**",
- "${workspaceFolder}/Kernel/NewBoot/**",
- "${workspaceFolder}/SDK/Developer/CoreSystem/**",
- "${workspaceFolder}/SDK/Developer/**"
+ "${workspaceFolder}/Boot/**",
+ "${workspaceFolder}/SDK/Library/CoreSystem/**",
+ "${workspaceFolder}/SDK/Library/**"
],
"defines": [
"__MAHROUSS__",
@@ -37,9 +37,9 @@
"name": "MicroKernel (Windows)",
"includePath": [
"${workspaceFolder}/Kernel/**",
- "${workspaceFolder}/Kernel/NewBoot/**",
- "${workspaceFolder}/SDK/Developer/CoreSystem/**",
- "${workspaceFolder}/SDK/Developer/**"
+ "${workspaceFolder}/Boot/**",
+ "${workspaceFolder}/SDK/Library/CoreSystem/**",
+ "${workspaceFolder}/SDK/Library/**"
],
"defines": [
"__MAHROUSS__",
diff --git a/SDK/Library/CorePEFRuntime/Sources/PEFStart.c b/SDK/Library/CorePEFRuntime/Sources/PEFStart.c
index 0dd6c3b7..594fba48 100644
--- a/SDK/Library/CorePEFRuntime/Sources/PEFStart.c
+++ b/SDK/Library/CorePEFRuntime/Sources/PEFStart.c
@@ -9,15 +9,15 @@
/// @brief Application entrypoint.
/// @param void
/// @return void
-CA_EXTERN_C VoidType AppMain(VoidType);
+CS_EXTERN_C VoidType AppMain(VoidType);
/// @brief Process entrypoint.
/// @param void
/// @return void
-CA_EXTERN_C VoidType __ImageStart(VoidType)
+CS_EXTERN_C VoidType __ImageStart(VoidType)
{
kSharedApplication = RtGetAppPointer();
- CA_MUST_PASS(kSharedApplication);
+ CS_MUST_PASS(kSharedApplication);
AppMain();
}
diff --git a/SDK/Library/CoreSystem/Headers/Alert.h b/SDK/Library/CoreSystem/Headers/Alert.h
index 57c9afeb..0e03842f 100644
--- a/SDK/Library/CoreSystem/Headers/Alert.h
+++ b/SDK/Library/CoreSystem/Headers/Alert.h
@@ -18,4 +18,8 @@
#include <Headers/Defines.h>
-CA_EXTERN_C VoidType Alert(const CharacterTypeUTF8* fmt, ...);
+/// @brief Shows an alert box, as provided by the OS.
+/// @param fmt The alert formating.
+/// @param
+/// @return
+CS_EXTERN_C VoidType Alert(const CharacterTypeUTF8* fmt, ...);
diff --git a/SDK/Library/CoreSystem/Headers/Defines.h b/SDK/Library/CoreSystem/Headers/Defines.h
index 600e9ab6..b0d8e45d 100644
--- a/SDK/Library/CoreSystem/Headers/Defines.h
+++ b/SDK/Library/CoreSystem/Headers/Defines.h
@@ -6,12 +6,12 @@
#pragma once
-#ifdef CA_MUST_PASS
-#undef CA_MUST_PASS
+#ifdef CS_MUST_PASS
+#undef CS_MUST_PASS
#endif
#ifdef _DEBUG
-#define CA_MUST_PASS(e) \
+#define CS_MUST_PASS(e) \
{ \
if (!e) \
{ \
@@ -19,31 +19,31 @@
} \
}
#else
-#define CA_MUST_PASS(e) CA_UNREFERENCED_PARAMETER(e)
+#define CS_MUST_PASS(e) CS_UNREFERENCED_PARAMETER(e)
#endif
#ifdef __cplusplus
-#define CA_EXTERN_C extern "C"
+#define CS_EXTERN_C extern "C"
#else
-#define CA_EXTERN_C extern
+#define CS_EXTERN_C extern
#endif
struct ApplicationInterface;
struct GUID;
-CA_EXTERN_C void RtAssertTriggerInterrupt(void);
+CS_EXTERN_C void RtAssertTriggerInterrupt(void);
-#define CA_STDCALL __attribute__((stdcall))
-#define CA_CDECL __attribute__((cdecl))
-#define CA_MSCALL __attribute__((ms_abi))
+#define CS_STDCALL __attribute__((stdcall))
+#define CS_CDECL __attribute__((cdecl))
+#define CS_MSCALL __attribute__((ms_abi))
#define PACKED __attribute__((packed))
-#define CA_PASCAL CA_STDCALL
+#define CS_PASCAL CS_STDCALL
#include <Headers/Hint.h>
@@ -79,20 +79,20 @@ typedef CharacterTypeUTF8 BooleanType;
#define Yes 1
#define No 0
-#define CA_PTR *
+#define CS_PTR *
-#define CA_UNREFERENCED_PARAMETER(e) ((VoidType)(e))
+#define CS_UNREFERENCED_PARAMETER(e) ((VoidType)(e))
#ifdef __x86_64__
-#define CA_FAR __far
-#define CA_NEAR __near
+#define CS_FAR __far
+#define CS_NEAR __near
#define _M_AMD64 2
#else
-#define CA_FAR
-#define CA_NEAR
+#define CS_FAR
+#define CS_NEAR
#endif
@@ -112,14 +112,14 @@ typedef CharacterTypeUTF8 BooleanType;
#define _M_RISCV 6
#endif
-#define CA_STATIC static
-#define CA_INLINE inline
-#define CA_CONST const
+#define CS_STATIC static
+#define CS_INLINE inline
+#define CS_CONST const
#ifdef __cplusplus
-#define CA_CONSTEXPR constexpr
+#define CS_CONSTEXPR constexpr
#else
-#define CA_CONSTEXPR
+#define CS_CONSTEXPR
#endif // __cplusplus
enum RtProcessCall
@@ -171,19 +171,19 @@ typedef struct ApplicationInterface
#ifdef __cplusplus
-#define CA_COPY_DELETE(KLASS) \
+#define CS_COPY_DELETE(KLASS) \
KLASS& operator=(const KLASS&) = delete; \
KLASS(const KLASS&) = delete;
-#define CA_COPY_DEFAULT(KLASS) \
+#define CS_COPY_DEFAULT(KLASS) \
KLASS& operator=(const KLASS&) = default; \
KLASS(const KLASS&) = default;
-#define CA_MOVE_DELETE(KLASS) \
+#define CS_MOVE_DELETE(KLASS) \
KLASS& operator=(KLASS&&) = delete; \
KLASS(KLASS&&) = delete;
-#define CA_MOVE_DEFAULT(KLASS) \
+#define CS_MOVE_DEFAULT(KLASS) \
KLASS& operator=(KLASS&&) = default; \
KLASS(KLASS&&) = default;
@@ -201,19 +201,19 @@ using StrType = CharacterTypeUTF8[N];
/// @brief Get app singleton.
/// @param
/// @return
-CA_EXTERN_C ApplicationInterfaceRef RtGetAppPointer(VoidType);
+CS_EXTERN_C ApplicationInterfaceRef RtGetAppPointer(VoidType);
/// @brief Get argument count
/// @param
/// @return
-CA_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType);
+CS_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType);
/// @brief Get argument pointer.
/// @param
/// @return
-CA_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType);
+CS_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType);
-CA_EXTERN_C ApplicationInterfaceRef kSharedApplication;
+CS_EXTERN_C ApplicationInterfaceRef kSharedApplication;
typedef CharacterTypeUTF8 StrType255[255];
diff --git a/SDK/Library/CoreSystem/Headers/File.h b/SDK/Library/CoreSystem/Headers/File.h
index 09cd0b88..c231271c 100644
--- a/SDK/Library/CoreSystem/Headers/File.h
+++ b/SDK/Library/CoreSystem/Headers/File.h
@@ -16,24 +16,24 @@ typedef QWordType FSRef;
/// @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, const CharacterTypeUTF8* r);
+CS_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, const CharacterTypeUTF8* r);
/// @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);
#define kMaxForkNameLength 256 /* long fork names. */
/// @brief A fork information header.
typedef struct _Fork
{
- PtrVoidType forkData;
- SizeType forkSize;
Int32Type forkFlags;
Int32Type forkKind;
CharacterTypeUTF8 forkName[kMaxForkNameLength];
-} ForkType;
+ SizeType forkSize;
+ CharacterTypeUTF8 forkData[];
+} ForkType, ForkTypePtr;
typedef ForkType* FSForkRef;
@@ -41,12 +41,10 @@ typedef ForkType* FSForkRef;
/// @param refFs the filesystem ref
/// @param forkName the fork's name
/// @return the fork data.
-CA_EXTERN_C FSForkRef FsGetFork(FSRef refFs, const CharacterTypeUTF8* forkName);
+CS_EXTERN_C FSForkRef FsGetFork(FSRef refFs, const CharacterTypeUTF8* forkName);
/// @brief Check if the filesystem path is valid.
/// @return if not return false, or true.
-CA_EXTERN_C BooleanType FsIsValidPath(const CharacterTypeUTF8* path);
+CS_EXTERN_C BooleanType FsIsValidPath(const CharacterTypeUTF8* path);
-/// @note not only limited to, there is code forks, icon forks...
-#define FsGetDataFork(refFs) FsGetFork(refFs, "data")
-#define FsGetRsrcFork(refFs) FsGetFork(refFs, "rsrc")
+/// END OF FILE
diff --git a/SDK/Library/CoreSystem/Headers/Heap.h b/SDK/Library/CoreSystem/Headers/Heap.h
index 0a02bb1a..d659ffb4 100644
--- a/SDK/Library/CoreSystem/Headers/Heap.h
+++ b/SDK/Library/CoreSystem/Headers/Heap.h
@@ -8,7 +8,7 @@
#include <Headers/Defines.h>
-#define kAllocationTypes 2
+#define kAllocationKindCount (2)
enum RtAllocationKind
{
@@ -20,20 +20,20 @@ enum RtAllocationKind
/// @param sz the size
/// @param flags the allocation flags.
/// @return
-CA_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz,
+CS_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz,
DWordType flags);
/// @brief Check if the pointer exists.
/// @param ptr the pointer to free.
/// @return
-CA_EXTERN_C BooleanType RtHeapPtrExists(PtrVoidType ptr);
+CS_EXTERN_C BooleanType RtHeapPtrExists(PtrVoidType ptr);
/// @brief Gets the size of the process' pointer.
/// @param ptr the pointer to free.
/// @return
-CA_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr);
+CS_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr);
/// @brief Frees the process pointer.
/// @param ptr the pointer to free.
/// @return
-CA_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr);
+CS_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr);
diff --git a/SDK/Library/CoreSystem/Headers/Intl.h b/SDK/Library/CoreSystem/Headers/Intl.h
index 5e4ef49e..9a06fdfe 100644
--- a/SDK/Library/CoreSystem/Headers/Intl.h
+++ b/SDK/Library/CoreSystem/Headers/Intl.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
@@ -21,4 +21,4 @@ BooleanType IntlSetLocale(const IntlRef intl);
/// @brief translate a string from a locale.
const CharacterTypeUTF8* Intl(const CharacterTypeUTF8* input,
- const IntlRef locale);
+ const IntlRef locale);
diff --git a/SDK/Library/CoreSystem/Headers/Math.h b/SDK/Library/CoreSystem/Headers/Math.h
index 87c792eb..d47dff6f 100644
--- a/SDK/Library/CoreSystem/Headers/Math.h
+++ b/SDK/Library/CoreSystem/Headers/Math.h
@@ -14,14 +14,14 @@
/// @brief Number generator helper.
/// @return Random generated number.
-CA_EXTERN_C SizeType MathRand(VoidType);
+CS_EXTERN_C SizeType MathRand(VoidType);
///////////////////////////////////////////////////////////////////////
/// Mathematical functions ///
///////////////////////////////////////////////////////////////////////
-CA_EXTERN_C FloatType Sqrt(FloatType number);
+CS_EXTERN_C FloatType Sqrt(FloatType number);
-CA_EXTERN_C FloatType Cosine(FloatType number);
-CA_EXTERN_C FloatType Sine(FloatType number);
-CA_EXTERN_C FloatType Tangent(FloatType number); \ No newline at end of file
+CS_EXTERN_C FloatType Cosine(FloatType number);
+CS_EXTERN_C FloatType Sine(FloatType number);
+CS_EXTERN_C FloatType Tangent(FloatType number); \ No newline at end of file
diff --git a/SDK/Library/CoreSystem/Headers/Rsrc.h b/SDK/Library/CoreSystem/Headers/Rsrc.h
index 7d76f50d..69438720 100644
--- a/SDK/Library/CoreSystem/Headers/Rsrc.h
+++ b/SDK/Library/CoreSystem/Headers/Rsrc.h
@@ -7,3 +7,6 @@
#pragma once
#include <Headers/Defines.h>
+
+/// @file Rsrc.h
+/// @brief RXML forks. \ No newline at end of file
diff --git a/SDK/Library/CoreSystem/Headers/Thread.h b/SDK/Library/CoreSystem/Headers/Thread.h
index f0360b63..2d760eec 100644
--- a/SDK/Library/CoreSystem/Headers/Thread.h
+++ b/SDK/Library/CoreSystem/Headers/Thread.h
@@ -19,7 +19,7 @@
typedef QWordType ThreadRef;
/// @brief Main application thread.
-CA_EXTERN_C ThreadRef kMainThread;
+CS_EXTERN_C ThreadRef kMainThread;
typedef VoidType (*ThreadEntrypointKind)(VoidType);
@@ -27,21 +27,21 @@ typedef VoidType (*ThreadEntrypointKind)(VoidType);
/// @param threadName the thread's name.
/// @param threadStart where to start.
/// @return
-CA_EXTERN_C ThreadRef CTCreate(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart);
+CS_EXTERN_C ThreadRef CSThreadCreate(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart);
/// @brief Dispoes the thread, and exits with code kThreadErrorExit
/// @param ref the thread reference.
/// @return nothing.
-CA_EXTERN_C VoidType CTRelease(ThreadRef ref);
+CS_EXTERN_C VoidType CSThreadRelease(ThreadRef ref);
/// @brief Waits for the thread to complete.
/// @param ref the thread reference.
/// @return nothing.
-CA_EXTERN_C VoidType CTJoin(ThreadRef ref);
+CS_EXTERN_C VoidType CSThreadJoin(ThreadRef ref);
/// @brief Yields the current thread.
/// @param ref the thead reference.
/// @return
-CA_EXTERN_C VoidType CTYield(ThreadRef ref);
+CS_EXTERN_C VoidType CSThreadYield(ThreadRef ref);
#endif // __THREAD__
diff --git a/SDK/Library/CoreSystem/Headers/Transport.h b/SDK/Library/CoreSystem/Headers/Transport.h
new file mode 100644
index 00000000..be9abbb2
--- /dev/null
+++ b/SDK/Library/CoreSystem/Headers/Transport.h
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+//
+// Created by Amlal on 5/12/24
+//
+
+#ifndef __TRANSPORT__
+#define __TRANSPORT__
+
+/// @file: Transport.h
+/// @brief Open Transport Layer, an alternative to berkeley sockets.
+
+#include <Headers/Defines.h>
+
+typedef QWordType CSStreamType;
+
+
+#endif // __TRANSPORT__ \ No newline at end of file
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;