acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_.h
1
// Created by camilo on 2022-10-22 19:56 <3ThomasBorregaardSorensen!!
2
#pragma once
3
4
5
#if defined(__ANDROID__)
6
7
8
//#define MUTEX_COND_TIMED
9
#undef MUTEX_NAMED_POSIX
// as of 2016-11-26
10
// not implemented (err=38) on android-19 (POSIX semaphore)
11
#define MUTEX_NAMED_FD
12
#undef MUTEX_NAMED_VSEM
13
14
#elif defined(__APPLE__) || defined(__BSD__)
15
16
//#define MUTEX_COND_TIMED
17
#undef MUTEX_NAMED_POSIX
18
#define MUTEX_NAMED_FD
// File Descriptor "Semaphore"
19
#undef MUTEX_NAMED_VSEM
20
21
#elif defined(LINUX)
22
23
//#define MUTEX_COND_TIMED
24
#undef MUTEX_NAMED_POSIX
25
#undef MUTEX_NAMED_FD
26
#define MUTEX_NAMED_FD
// File Descriptor "Semaphore"
27
//#define MUTEX_NAMED_VSEM // system() V Semaphore
28
#undef MUTEX_NAMED_VSEM
29
30
#endif
31
32
CLASS_DECL_ACME
bool
task_get_run();
33
34
CLASS_DECL_ACME::task * get_task();
35
36
CLASS_DECL_ACME
void
__call(const ::procedure & procedure);
37
38
39
//CLASS_DECL_ACME bool main_synchronous(const class time & time, const ::procedure & function);
40
41
42
//CLASS_DECL_ACME void main_asynchronous(const ::procedure & procedure);
43
44
45
46
47
CLASS_DECL_ACME
bool
predicate_Sleep(::i32 iTime,
::function
<
bool
(
void
) > functionOkToSleep);
48
49
CLASS_DECL_ACME
void
preempt();
50
51
CLASS_DECL_ACME
void
preempt(
const
class
time
&
time
);
52
53
CLASS_DECL_ACME
bool
is_single_main_user_thread();
54
55
CLASS_DECL_ACME
bool
is_main_thread();
56
57
CLASS_DECL_ACME
itask
main_itask();
58
59
CLASS_DECL_ACME
htask
main_htask();
60
61
CLASS_DECL_ACME
itask
current_itask();
62
63
CLASS_DECL_ACME
htask
current_htask();
64
65
CLASS_DECL_ACME
itask
as_itask(
htask
htask
);
66
67
CLASS_DECL_ACME
void
set_main_user_thread();
68
69
CLASS_DECL_ACME
void
set_main_htask(
htask
htask
);
70
71
CLASS_DECL_ACME
void
set_main_itask(
itask
itask
);
72
73
CLASS_DECL_ACME
void
preempt();
74
75
CLASS_DECL_ACME
bool
task_sleep(
const
class
time
& timeWait);
76
77
CLASS_DECL_ACME
bool
task_get_run();
78
79
#ifdef WINDOWS_DESKTOP
80
81
CLASS_DECL_ACME
void
attach_thread_input_to_main_thread(
bool
bAttach);
82
83
#endif
84
85
86
namespace
parallelization
87
{
88
89
90
class
queue
;
91
92
93
CLASS_DECL_ACME
bool
set_priority(enum_priority epriority);
94
95
CLASS_DECL_ACME
bool
set_priority(htask htask, enum_priority epriority);
96
97
CLASS_DECL_ACME enum_priority get_priority();
98
99
CLASS_DECL_ACME enum_priority get_priority(htask htask);
100
101
102
//inline ::i32 get_priority_none()
103
//{
104
105
// return e_priority_none;
106
107
//}
108
109
110
//inline ::i32 get_priority_normal()
111
//{
112
113
// return e_priority_normal;
114
115
//}
116
117
118
}
// namespace parallelization
119
120
121
function
Definition
_template_forward_declaration.h:271
htask
Definition
types.h:47
itask
Definition
types.h:93
parallelization::queue
Definition
queue.h:11
time
Definition
aaa_time.h:13
parallelization
_.h
Generated by
1.17.0