diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-21 22:39:57 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-21 22:39:57 +0100 |
| commit | 80b76666074aa94f165e3db7b3dda2145ca6efc0 (patch) | |
| tree | ba8a189df55f3dab4d3623eb4617c7b5d33c7f07 /Public/Kits/System.Core/Headers/Thread.hxx | |
| parent | dafcc53840c41dab7a1897868d020a5b196d5b2d (diff) | |
unstable, kernel+api: important breaking changes.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Kits/System.Core/Headers/Thread.hxx')
| -rw-r--r-- | Public/Kits/System.Core/Headers/Thread.hxx | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Public/Kits/System.Core/Headers/Thread.hxx b/Public/Kits/System.Core/Headers/Thread.hxx new file mode 100644 index 00000000..306419b3 --- /dev/null +++ b/Public/Kits/System.Core/Headers/Thread.hxx @@ -0,0 +1,49 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +// +// Created by Amlal on 3/18/24 +// + +#ifndef __THREAD_API__ +#define __THREAD_API__ + +#include <System.Core/Headers/Defs.hxx> + +/// @brief Thread Information Block, which holds information about the running thread. +typedef PtrVoidType PtrThread; + +/// @brief Creates a new thread. +/// @param StartProc +/// @param OptionalHeap +/// @param OptionalStack +/// @param Detach +/// @param Join +/// @return +PtrThread HcCreateThread(_Input PtrVoidType StartProc, + _Optional _InOut PtrVoidType OptionalHeap, + _Optional _InOut PtrVoidType OptionalStack, + _Optional _Input BooleanType Detach, + _Optional _Input BooleanType Join); + +/// @brief Destroys the thread object. +/// @param ThreadPtr +/// @return +BooleanType HcDestroyThread(_Input PtrThread ThreadPtr); + +/// @brief Stops the thread. +/// @param ThreadPtr +/// @return +BooleanType HcStopThread(_Input PtrThread ThreadPtr); + +/// @brief Resumes it. +/// @param ThreadPtr +/// @return +BooleanType HcResumeThread(_Input PtrThread ThreadPtr); + +QWordType HcProcessIdThread(_Input PtrThread ThreadPtr); + +#endif // __THREAD_API__ |
