ae2f_docs
Thrd.h
Go to the documentation of this file.
1/**
2 * @file Thrd.h
3 * Detach is not implemented since I do not know a way to do this without 3rd object.
4 * */
5
6#ifndef ae2f_Sys_Thrd_h
7#define ae2f_Sys_Thrd_h
8
9#include "./Thrd.core.h"
10#include "./Thrd.auto.h"
11
12
13/** @brief Return type for thread. */
15
16
17/** @brief Parameters for thread */
19
20
21/** @brief Thread ID */
23
24/** @brief Thread starting function type */
26
27
28
29/** @brief
30 * enum values related to thread. \n
31 * 't follows C11 thread standard.
32 * */
33typedef enum ae2f_eSysThrd_t {
34 /** Good */
36
37 /** Out of host memory */
39
40 /** Timeout */
42
43 ae2f_eSysThrdBusy,
44 ae2f_eSysThrdErr,
45} ae2f_eSysThrd_t;
46
47/**
48 * @brief A thread.
49 * @warning
50 * This structure's size could vary for implementation.
51 * */
52ae2f_structdef(struct, ae2f_SysThrd)
53{
54 /** thread id */
56
57 /** stack ptr (linux only) */
58 ae2f_Sys__linux(_ae2f_SysThrdStckPtr_t m_stck;)
59
60 /** stack size (linux only) */
61 ae2f_Sys__linux(size_t m_stcksz;)
62};
63
64#endif
65
67
69typedef char _ae2f_SysThrdMk_imp_NOT_FOUND[-1];
70#endif
71
73typedef char _ae2f_SysThrdJoin_imp_NOT_FOUND[-1];
74#endif
75
77typedef char _ae2f_SysThrdYield_imp_NOT_FOUND[-1];
78#endif
79
81typedef char _ae2f_SysThrdSleep_imp_NOT_FOUND[-1];
82#endif
83
84#endif
#define ae2f_structdef(key, name)
Definition Cast.h:110
#define ae2f_reinterpret_cast(t, v)
Definition Cast.h:52
#define unless(...)
Invokes when condition is false.
Definition Cast.h:103
#define __ae2f_MACRO_GENERATED
Definition Conv.auto.h:2
#define _ae2f_SysFtxWait(ret_err, prm_uaddr, prm_val)
Definition Ftx.auto.h:109
_ae2f_SysFtxRet_t ae2f_SysFtxRet_t
State for futex operation.
Definition Ftx.h:22
#define ae2f_Sys__linux
Definition Sys.h:14
#define _ae2f_SysThrdJoin_imp(ret_stat, ret_rtn, ref_thrd)
Definition Thrd.auto.h:333
#define _ae2f_SysThrdYield_imp()
Definition Thrd.auto.h:374
#define _ae2f_SysThrdSleep_imp(ret_stat, prm_req, prm_rem)
Definition Thrd.auto.h:361
#define ae2f_Sys_Thrd_auto_h
Definition Thrd.auto.h:25
#define _ae2f_SysThrdMk_imp(ret_stat, ret_thrd, prm_func, prm_arg, prm_stcksz_unused)
Definition Thrd.auto.h:297
#define _ae2f_SysThrdID_t
Definition Thrd.core.h:93
#define _ae2f_SysThrdPrm_t
Definition Thrd.core.h:92
#define _ae2f_SysThrdRes_t
Definition Thrd.core.h:91
ae2f_eSysThrd_t
enum values related to thread. 't follows C11 thread standard.
Definition Thrd.h:33
@ ae2f_eSysThrdTmOut
Definition Thrd.h:41
@ ae2f_eSysThrdMemOut
Definition Thrd.h:38
@ ae2f_eSysThrdSuccess
Definition Thrd.h:35
_ae2f_SysThrdRes_t ae2f_SysThrdRes_t
Return type for thread.
Definition Thrd.h:14
_ae2f_SysThrdPrm_t ae2f_SysThrdPrm_t
Parameters for thread.
Definition Thrd.h:18
ae2f_SysThrdRes_t ae2f_SysThrdFn_t(ae2f_SysThrdPrm_t)
Thread starting function type.
Definition Thrd.h:25
_ae2f_SysThrdID_t ae2f_SysThrdID_t
Thread ID.
Definition Thrd.h:22
#define ae2f_MAC(...)
Definition mac.h:28