blob: ae6ba057b91759eab472afc3ed73e530e337542c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* -------------------------------------------
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);
/// @brief Main application thread.
CA_EXTERN_C PtrThread kMainThread;
#endif // __THREAD_API__
|