summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorLucas <Coquinho@users.noreply.github.com>2020-04-30 14:11:51 -0300
committerGitHub <noreply@github.com>2020-04-30 14:11:51 -0300
commitea6d1c40eef1f5b02b3654ec6413d33106e3c078 (patch)
tree89a524de13f5b1582dad6d836c9888dbf30d7c2b /src/lib/evil
parent728e1afde96f2d58d18d5b7599a3c0dffbc55240 (diff)
Windows:eina: Add Thread synchronization (#34)
This should add all needed functions/structures for thread synchronization besides: - eina_condition initialization; - cond_timedwait.
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/unposix/meson.build1
-rw-r--r--src/lib/evil/unposix/pthread.h213
-rw-r--r--src/lib/evil/unposix/semaphore.h59
3 files changed, 0 insertions, 273 deletions
diff --git a/src/lib/evil/unposix/meson.build b/src/lib/evil/unposix/meson.build
index 6fba6e87c2..53d82022fa 100644
--- a/src/lib/evil/unposix/meson.build
+++ b/src/lib/evil/unposix/meson.build
@@ -10,7 +10,6 @@ if sys_windows
10 'locale.h', 10 'locale.h',
11 'math.h', 11 'math.h',
12 'pthread.h', 12 'pthread.h',
13 'semaphore.h',
14 'stdlib.h', 13 'stdlib.h',
15 'string.h', 14 'string.h',
16 'strings.h', 15 'strings.h',
diff --git a/src/lib/evil/unposix/pthread.h b/src/lib/evil/unposix/pthread.h
index 7790821c8d..98491dcb49 100644
--- a/src/lib/evil/unposix/pthread.h
+++ b/src/lib/evil/unposix/pthread.h
@@ -5,24 +5,15 @@
5 5
6UNIMPLEMENTED typedef unsigned long long pthread_t; 6UNIMPLEMENTED typedef unsigned long long pthread_t;
7 7
8UNIMPLEMENTED_STRUCT_T(pthread_mutexattr)
9UNIMPLEMENTED_STRUCT_T(pthread_condattr)
10UNIMPLEMENTED_STRUCT_T(pthread_attr) 8UNIMPLEMENTED_STRUCT_T(pthread_attr)
11UNIMPLEMENTED_STRUCT_T(pthread_rwlock)
12UNIMPLEMENTED_STRUCT_T(pthread_cond)
13UNIMPLEMENTED_STRUCT_T(pthread_mutex)
14UNIMPLEMENTED_STRUCT_T(sem)
15 9
16UNIMPLEMENTED struct sched_param { 10UNIMPLEMENTED struct sched_param {
17 int sched_priority; 11 int sched_priority;
18}; 12};
19 13
20UNIMPLEMENTED typedef int pthread_key_t;
21
22#define SCHED_RR 5 14#define SCHED_RR 5
23#define SCHED_FIFO 6 15#define SCHED_FIFO 6
24 16
25#define PTHREAD_BARRIER_SERIAL_THREAD 1
26#define PTHREAD_CANCEL_ASYNCHRONOUS 2 17#define PTHREAD_CANCEL_ASYNCHRONOUS 2
27#define PTHREAD_CANCEL_ENABLE 3 18#define PTHREAD_CANCEL_ENABLE 3
28#define PTHREAD_CANCEL_DEFERRED 4 19#define PTHREAD_CANCEL_DEFERRED 4
@@ -32,12 +23,6 @@ UNIMPLEMENTED typedef int pthread_key_t;
32#define PTHREAD_CREATE_JOINABLE 8 23#define PTHREAD_CREATE_JOINABLE 8
33#define PTHREAD_EXPLICIT_SCHED 9 24#define PTHREAD_EXPLICIT_SCHED 9
34#define PTHREAD_INHERIT_SCHED 10 25#define PTHREAD_INHERIT_SCHED 10
35#define PTHREAD_MUTEX_DEFAULT 11
36#define PTHREAD_MUTEX_ERRORCHECK 12
37#define PTHREAD_MUTEX_NORMAL 13
38#define PTHREAD_MUTEX_RECURSIVE 14
39#define PTHREAD_MUTEX_ROBUST 15
40#define PTHREAD_MUTEX_STALLED 16
41#define PTHREAD_ONCE_INIT 17 26#define PTHREAD_ONCE_INIT 17
42#define PTHREAD_PRIO_INHERIT 18 27#define PTHREAD_PRIO_INHERIT 18
43#define PTHREAD_PRIO_NONE 19 28#define PTHREAD_PRIO_NONE 19
@@ -47,202 +32,4 @@ UNIMPLEMENTED typedef int pthread_key_t;
47#define PTHREAD_SCOPE_PROCESS 23 32#define PTHREAD_SCOPE_PROCESS 23
48#define PTHREAD_SCOPE_SYSTEM 24 33#define PTHREAD_SCOPE_SYSTEM 24
49 34
50UNIMPLEMENTED inline int pthread_mutex_trylock(void* m)
51{
52 #warning pthread_mutex_trylock is not implemented.
53 return 0;
54}
55
56UNIMPLEMENTED inline int pthread_mutex_lock(void* m)
57{
58 #warning pthread_mutex_lock is not implemented.
59 return 0;
60}
61
62UNIMPLEMENTED inline int pthread_mutex_unlock(void* m)
63{
64 #warning pthread_mutex_unlock is not implemented.
65 return 0;
66}
67
68UNIMPLEMENTED inline int pthread_cond_wait(void* c, void* m)
69{
70 #warning pthread_cond_wait is not implemented.
71 return 0;
72}
73
74UNIMPLEMENTED inline int pthread_cond_timedwait(void* c, void* m, int t)
75{
76 #warning pthread_cond_timedwait is not implemented.
77 return 0;
78}
79
80UNIMPLEMENTED inline int pthread_cond_broadcast(void* c)
81{
82 #warning pthread_cond_broadcast is not implemented.
83 return 0;
84}
85
86UNIMPLEMENTED inline int pthread_cond_signal(void* c)
87{
88 #warning pthread_cond_signal is not implemented.
89 return 0;
90}
91
92UNIMPLEMENTED inline int pthread_rwlock_init(void* a, ...)
93{
94 #warning pthread_rwlock_init is not implemented.
95 return 0;
96}
97
98UNIMPLEMENTED inline int pthread_mutexattr_settype(void* a, ...)
99{
100 #warning pthread_mutexattr_settype is not implemented.
101 return 0;
102}
103
104UNIMPLEMENTED inline int pthread_mutex_init(void* a, ...)
105{
106 #warning pthread_mutex_init is not implemented.
107 return 0;
108}
109
110UNIMPLEMENTED inline int pthread_mutex_destroy(void* a, ...)
111{
112 #warning pthread_mutex_destroy is not implemented.
113 return 0;
114}
115
116UNIMPLEMENTED inline int pthread_condattr_init(void* a, ...)
117{
118 #warning pthread_condattr_init is not implemented.
119 return 0;
120}
121
122UNIMPLEMENTED inline int pthread_cond_init(void* a, ...)
123{
124 #warning pthread_cond_init is not implemented.
125 return 0;
126}
127
128UNIMPLEMENTED inline int pthread_condattr_destroy(void* a, ...)
129{
130 #warning pthread_condattr_destroy is not implemented.
131 return 0;
132}
133
134UNIMPLEMENTED inline int pthread_cond_destroy(void* a, ...)
135{
136 #warning pthread_cond_destroy is not implemented.
137 return 0;
138}
139
140UNIMPLEMENTED inline int pthread_rwlock_destroy(void* a, ...)
141{
142 #warning pthread_rwlock_destroy is not implemented.
143 return 0;
144}
145
146UNIMPLEMENTED inline int pthread_rwlock_rdlock(void* c)
147{
148 #warning pthread_rwlock_rdlock is not implemented.
149 return 0;
150}
151
152UNIMPLEMENTED inline int pthread_rwlock_wrlock(void* c)
153{
154 #warning pthread_rwlock_wrlock is not implemented.
155 return 0;
156}
157
158UNIMPLEMENTED inline int pthread_rwlock_unlock(void* c)
159{
160 #warning pthread_rwlock_unlock is not implemented.
161 return 0;
162}
163
164UNIMPLEMENTED inline int pthread_key_create(void* c, void * d)
165{
166 #warning pthread_key_create is not implemented.
167 return 0;
168}
169
170UNIMPLEMENTED inline int pthread_key_delete(void* c)
171{
172 #warning pthread_key_delete is not implemented.
173 return 0;
174}
175
176UNIMPLEMENTED inline int pthread_getspecific(void* c)
177{
178 #warning pthread_getspecific is not implemented.
179 return 0;
180}
181
182UNIMPLEMENTED inline int pthread_setspecific(void* c, const void* d)
183{
184 #warning pthread_setspecific is not implemented.
185 return 0;
186}
187
188UNIMPLEMENTED inline int pthread_mutexattr_init(void* c, ...)
189{
190 #warning pthread_mutexattr_init is not implemented.
191 return 0;
192}
193
194UNIMPLEMENTED inline int pthread_getschedparam(void* a, ...)
195{
196 #warning pthread_getschedparam is not implemented.
197 return 0;
198}
199
200UNIMPLEMENTED inline int pthread_setschedparam(void* c, void* d, void* e)
201{
202 #warning pthread_ is not implemented.
203 return 0;
204}
205
206UNIMPLEMENTED inline int pthread_setcancelstate(void* a, ...)
207{
208 #warning pthread_setcancelstate is not implemented.
209 return 0;
210}
211
212UNIMPLEMENTED inline int pthread_testcancel()
213{
214 #warning pthread_testcancel is not implemented.
215 return 0;
216}
217
218UNIMPLEMENTED inline int pthread_cleanup_pop(void* a, ...)
219{
220 #warning pthread_cleanup_pop is not implemented.
221 return 0;
222}
223
224UNIMPLEMENTED inline int pthread_cleanup_push(void* a, ...)
225{
226 #warning pthread_cleanup_push is not implemented.
227 return 0;
228}
229
230UNIMPLEMENTED inline int pthread_attr_init(void* a, ...)
231{
232 #warning pthread_attr_init is not implemented.
233 return 0;
234}
235
236UNIMPLEMENTED inline int pthread_setcanceltype(void* a, ...)
237{
238 #warning pthread_setcanceltype is not implemented.
239 return 0;
240}
241
242UNIMPLEMENTED inline int pthread_mutexattr_destroy(void* a, ...)
243{
244 #warning pthread_mutexattr_destroy is not implemented.
245 return 0;
246}
247
248#endif 35#endif
diff --git a/src/lib/evil/unposix/semaphore.h b/src/lib/evil/unposix/semaphore.h
deleted file mode 100644
index 0e1f46f5bb..0000000000
--- a/src/lib/evil/unposix/semaphore.h
+++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef SEMAPHORE_H
2#define SEMAPHORE_H
3
4#include "unimplemented.h"
5
6UNIMPLEMENTED_STRUCT_T(sem)
7
8UNIMPLEMENTED inline int sem_close(sem_t* sem)
9{
10 #warning sem_close is not implemented
11 return 0;
12}
13UNIMPLEMENTED inline int sem_destroy(sem_t* sem)
14{
15 #warning sem_destroy is not implemented
16 return 0;
17}
18UNIMPLEMENTED inline int sem_getvalue(sem_t* restrict sem, int* restrict x)
19{
20 #warning sem_getvalue is not implemented
21 return 0;
22}
23UNIMPLEMENTED inline int sem_init(sem_t* sem, int x, unsigned y)
24{
25 #warning sem_init is not implemented
26 return 0;
27}
28UNIMPLEMENTED inline sem_t* sem_open(const char* name, int x, ...)
29{
30 #warning sem_open is not implemented
31 return 0;
32}
33UNIMPLEMENTED inline int sem_post(sem_t* sem)
34{
35 #warning sem_post is not implemented
36 return 0;
37}
38UNIMPLEMENTED inline int sem_timedwait(sem_t* restrict sem, const struct timespec* restrict timeout)
39{
40 #warning sem_timedwait is not implemented
41 return 0;
42}
43UNIMPLEMENTED inline int sem_trywait(sem_t* sem)
44{
45 #warning sem_trywait is not implemented
46 return 0;
47}
48UNIMPLEMENTED inline int sem_unlink(const char* name)
49{
50 #warning sem_unlink is not implemented
51 return 0;
52}
53UNIMPLEMENTED inline int sem_wait(sem_t* sem)
54{
55 #warning sem_wait is not implemented
56 return 0;
57}
58
59#endif