From ca83108fd138cc0398f900e6a6c0a53ad51aee31 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 7 May 2024 17:42:32 +0200 Subject: MHR-23: Rework graphics stack, moving to another repository. - Alongside patches on the FileManager. - And code improvements on the System API. Signed-off-by: Amlal El Mahrouss --- Public/Developer/SystemLib/Headers/Intl.h | 2 +- Public/Developer/SystemLib/Headers/Thread.h | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'Public/Developer/SystemLib') diff --git a/Public/Developer/SystemLib/Headers/Intl.h b/Public/Developer/SystemLib/Headers/Intl.h index 1cd5ea64..2e91812e 100644 --- a/Public/Developer/SystemLib/Headers/Intl.h +++ b/Public/Developer/SystemLib/Headers/Intl.h @@ -20,5 +20,5 @@ BooleanType IntlSetLocale(const IntlRef intl); /// @brief locale helpers. /// @brief translate a string from a locale. -const CharacterTypeUTF8* IntlTranslate(const CharacterTypeUTF8* input, +const CharacterTypeUTF8* Intl(const CharacterTypeUTF8* input, const IntlRef locale); diff --git a/Public/Developer/SystemLib/Headers/Thread.h b/Public/Developer/SystemLib/Headers/Thread.h index 2bcebdcd..9562003e 100644 --- a/Public/Developer/SystemLib/Headers/Thread.h +++ b/Public/Developer/SystemLib/Headers/Thread.h @@ -13,10 +13,9 @@ #include -#define kThreadErrorExit -33 +#define kThreadErrorExit (-33) -/// @brief Thread Information Block, which holds information about the running -/// thread. +/// @brief Thread reference. typedef QWordType ThreadRef; /// @brief Main application thread. @@ -28,16 +27,21 @@ typedef VoidType (*ThreadEntrypointKind)(VoidType); /// @param threadName the thread's name. /// @param threadStart where to start. /// @return -CA_EXTERN_C ThreadRef TmCreateThread(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart); +CA_EXTERN_C ThreadRef CTCreate(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 TmDisposeThread(ThreadRef ref); +CA_EXTERN_C VoidType CTRelease(ThreadRef ref); /// @brief Waits for the thread to complete. /// @param ref the thread reference. /// @return nothing. -CA_EXTERN_C VoidType TmWaitForCompletion(ThreadRef ref); +CA_EXTERN_C VoidType CTJoin(ThreadRef ref); + +/// @brief Yields the current thread. +/// @param ref the thead reference. +/// @return +CA_EXTERN_C VoidType CTYield(ThreadRef ref); #endif // __THREAD__ -- cgit v1.2.3