diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-26 20:00:41 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-26 20:01:41 +0100 |
| commit | 5ab8bb9c497f673a81da693e9aacc78210718000 (patch) | |
| tree | 3ae1d5fe040c2c09e92e121436a54650b0adcd35 /Public/Developer/System.Core/Headers/Thread.hxx | |
| parent | 9a0c2664b0ca5634aa557b0761139cccfb0fe753 (diff) | |
Kernel: Implement more API calls.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Developer/System.Core/Headers/Thread.hxx')
| -rw-r--r-- | Public/Developer/System.Core/Headers/Thread.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Public/Developer/System.Core/Headers/Thread.hxx b/Public/Developer/System.Core/Headers/Thread.hxx index df803860..a441041d 100644 --- a/Public/Developer/System.Core/Headers/Thread.hxx +++ b/Public/Developer/System.Core/Headers/Thread.hxx @@ -13,6 +13,8 @@ #include <System.Core/Headers/Defines.hxx> +#define kThreadErrorExit -33 + /// @brief Thread Information Block, which holds information about the running /// thread. typedef QWordType ThreadRef; @@ -20,4 +22,17 @@ typedef QWordType ThreadRef; /// @brief Main application thread. CA_EXTERN_C ThreadRef kMainThread; +typedef VoidType(*ThreadEntrypointKind)(VoidType); + +/// @brief Creates a new thread, and runs the code. +/// @param threadName the thread's name. +/// @param threadStart where to start. +/// @return +CA_EXTERN_C ThreadRef CreateThread(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart); + +/// @brief Dispoes the thread, and exits with code kThreadErrorExit +/// @param ref +/// @return +CA_EXTERN_C VoidType DisposeThread(ThreadRef ref); + #endif // __THREAD_API__ |
