diff options
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__ |
