XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
SThd.cxx
浏览该文件的文档.
1
13#include "xwos/cxx/SThd.hxx"
14
15namespace xwos {
16
17/* Non-static Member */
18SThd::SThd(const char * name,
19 xwstk_t * stack, xwsz_t stack_size, xwsz_t stack_guard_size,
20 xwpr_t priority, bool detached, bool privileged)
21 : mThdDesc{nullptr, 0}
22{
23 struct xwos_thd_attr attr({
24 .name = name,
25 .stack = stack,
26 .stack_size = stack_size,
27 .stack_guard_size = stack_guard_size,
28 .priority = priority,
29 .detached = detached,
30 .privileged = privileged,
31 });
33}
34
36{
37}
38
40{
41 return XWOK;
42}
43
44/* Static Member */
46{
47 return obj->thdMainFunction();
48}
49
50} // namespace xwos
xwos::SThd
静态线程
Definition SThd.hxx:38
xwer_t mCtorRc
Definition SThd.hxx:42
virtual xwer_t thdMainFunction()
Definition SThd.cxx:39
xwos_thd_d mThdDesc
Definition SThd.hxx:40
static xwer_t sThdMainFunction(SThd *thd)
Definition SThd.cxx:45
SThd(const char *name, xwstk_t *stack, xwsz_t stack_size, xwsz_t stack_guard_size=XWOS_STACK_GUARD_SIZE_DEFAULT, xwpr_t priority=XWOS_SKD_PRIORITY_RT_MIN, bool detached=false, bool privileged=true)
静态线程构造函数
Definition SThd.cxx:18
struct xwos_thd mThd
Definition SThd.hxx:41
#define XWOK
No error
Definition errno.h:182
signed long xwer_t
Definition type.h:554
xws32_t xwpr_t
Definition type.h:534
xwptr_t xwstk_t
Definition type.h:392
unsigned long xwsz_t
Definition type.h:339
xwer_t(* xwos_thd_f)(void *)
XWOS API:线程函数指针类型
Definition thd.h:144
static xwer_t xwos_thd_init(struct xwos_thd *thd, xwos_thd_d *thdd, const struct xwos_thd_attr *attr, xwos_thd_f thdfunc, void *arg)
XWOS API:静态方式初始化线程
Definition thd.h:263
Definition Cpu.hxx:19
XWOS API:线程属性
Definition thd.h:162