author | unc0rr |
Thu, 10 Dec 2015 00:33:45 +0300 | |
branch | qmlfrontend |
changeset 11450 | 0c75fa9ce340 |
parent 11418 | 091149424aa4 |
child 11451 | 6e9b12864856 |
permissions | -rw-r--r-- |
10406 | 1 |
unit uFLIPC; |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
2 |
interface |
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10416
diff
changeset
|
3 |
uses SDLh, uFLTypes; |
10406 | 4 |
|
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
5 |
procedure initIPC; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
6 |
procedure freeIPC; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
7 |
|
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
8 |
procedure ipcToEngine(s: shortstring); |
10898 | 9 |
procedure ipcToEngineRaw(p: pointer; len: Longword); |
10420 | 10 |
//function ipcReadFromEngine: shortstring; |
11 |
//function ipcCheckFromEngine: boolean; |
|
10406 | 12 |
|
10935 | 13 |
procedure ipcToNet(s: shortstring); |
14 |
procedure ipcToNetRaw(p: pointer; len: Longword); |
|
15 |
||
10412 | 16 |
procedure ipcToFrontend(s: shortstring); |
10420 | 17 |
procedure ipcToFrontendRaw(p: pointer; len: Longword); |
10412 | 18 |
function ipcReadFromFrontend: shortstring; |
19 |
function ipcCheckFromFrontend: boolean; |
|
20 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
21 |
procedure registerIPCCallback(p: pointer; f: TIPCCallback); |
10935 | 22 |
procedure registerNetCallback(p: pointer; f: TIPCCallback); |
10416 | 23 |
|
10406 | 24 |
implementation |
25 |
||
10935 | 26 |
var callbackPointerF: pointer; |
27 |
callbackFunctionF: TIPCCallback; |
|
28 |
callbackListenerThreadF: PSDL_Thread; |
|
29 |
callbackPointerN: pointer; |
|
30 |
callbackFunctionN: TIPCCallback; |
|
31 |
callbackListenerThreadN: PSDL_Thread; |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
32 |
queueFrontend, queueEngine, queueNet: PIPCQueue; |
10416 | 33 |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
34 |
procedure ipcSend(var s: TIPCMessage; queue: PIPCQueue); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
35 |
var pmsg: PIPCMessage; |
10412 | 36 |
begin |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
37 |
SDL_LockMutex(queue^.mut); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
38 |
|
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
39 |
s.next:= nil; |
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10416
diff
changeset
|
40 |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
41 |
if (queue^.msg.next = nil) and (queue^.msg.str[0] = #0) and (queue^.msg.buf = nil) then |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
42 |
begin |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
43 |
queue^.msg:= s; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
44 |
end else |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
45 |
begin |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
46 |
new(pmsg); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
47 |
pmsg^:= s; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
48 |
queue^.last^.next:= pmsg; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
49 |
queue^.last:= pmsg; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
50 |
end; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
51 |
SDL_CondSignal(queue^.cond); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
52 |
SDL_UnlockMutex(queue^.mut); |
10412 | 53 |
end; |
54 |
||
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
55 |
function ipcRead(queue: PIPCQueue): TIPCMessage; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
56 |
var pmsg: PIPCMessage; |
10412 | 57 |
begin |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
58 |
SDL_LockMutex(queue^.mut); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
59 |
while (queue^.msg.str[0] = #0) and (queue^.msg.buf = nil) and (queue^.msg.next = nil) do |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
60 |
SDL_CondWait(queue^.cond, queue^.mut); |
10412 | 61 |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
62 |
if (queue^.msg.str[0] <> #0) or (queue^.msg.buf <> nil) then |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
63 |
begin |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
64 |
ipcRead:= queue^.msg; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
65 |
queue^.msg.str[0]:= #0; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
66 |
queue^.msg.buf:= nil; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
67 |
end else |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
68 |
begin |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
69 |
pmsg:= queue^.msg.next; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
70 |
ipcRead:= pmsg^; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
71 |
queue^.msg.next:= pmsg^.next; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
72 |
if queue^.msg.next = nil then queue^.last:= @queue^.msg; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
73 |
dispose(pmsg) |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
74 |
end; |
10420 | 75 |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
76 |
SDL_UnlockMutex(queue^.mut) |
10412 | 77 |
end; |
78 |
||
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
79 |
function ipcCheck(queue: PIPCQueue): boolean; |
10412 | 80 |
begin |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
81 |
SDL_LockMutex(queue^.mut); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
82 |
ipcCheck:= (queue^.msg.str[0] > #0) or (queue^.msg.buf <> nil) or (queue^.msg.next <> nil); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
83 |
SDL_UnlockMutex(queue^.mut) |
10412 | 84 |
end; |
85 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
86 |
procedure ipcToEngine(s: shortstring); |
10420 | 87 |
var msg: TIPCMessage; |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
88 |
begin |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
89 |
msg.str:= s; |
10420 | 90 |
msg.buf:= nil; |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
91 |
ipcSend(msg, queueEngine) |
10412 | 92 |
end; |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
93 |
|
10412 | 94 |
procedure ipcToFrontend(s: shortstring); |
10420 | 95 |
var msg: TIPCMessage; |
10412 | 96 |
begin |
10420 | 97 |
msg.str:= s; |
98 |
msg.buf:= nil; |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
99 |
ipcSend(msg, queueFrontend) |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
100 |
end; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
101 |
|
10935 | 102 |
procedure ipcToNet(s: shortstring); |
103 |
var msg: TIPCMessage; |
|
104 |
begin |
|
105 |
msg.str:= s; |
|
106 |
msg.buf:= nil; |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
107 |
ipcSend(msg, queueNet) |
10935 | 108 |
end; |
109 |
||
10898 | 110 |
procedure ipcToEngineRaw(p: pointer; len: Longword); |
111 |
var msg: TIPCMessage; |
|
112 |
begin |
|
113 |
msg.str[0]:= #0; |
|
114 |
msg.len:= len; |
|
115 |
msg.buf:= GetMem(len); |
|
116 |
Move(p^, msg.buf^, len); |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
117 |
ipcSend(msg, queueEngine) |
10898 | 118 |
end; |
119 |
||
10420 | 120 |
procedure ipcToFrontendRaw(p: pointer; len: Longword); |
121 |
var msg: TIPCMessage; |
|
122 |
begin |
|
123 |
msg.str[0]:= #0; |
|
124 |
msg.len:= len; |
|
125 |
msg.buf:= GetMem(len); |
|
126 |
Move(p^, msg.buf^, len); |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
127 |
ipcSend(msg, queueFrontend) |
10420 | 128 |
end; |
129 |
||
10935 | 130 |
procedure ipcToNetRaw(p: pointer; len: Longword); |
131 |
var msg: TIPCMessage; |
|
132 |
begin |
|
133 |
msg.str[0]:= #0; |
|
134 |
msg.len:= len; |
|
135 |
msg.buf:= GetMem(len); |
|
136 |
Move(p^, msg.buf^, len); |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
137 |
ipcSend(msg, queueNet) |
10935 | 138 |
end; |
139 |
||
10420 | 140 |
function ipcReadFromEngine: TIPCMessage; |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
141 |
begin |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
142 |
ipcReadFromEngine:= ipcRead(queueFrontend) |
10412 | 143 |
end; |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
144 |
|
10412 | 145 |
function ipcReadFromFrontend: shortstring; |
146 |
begin |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
147 |
ipcReadFromFrontend:= ipcRead(queueEngine).str |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
148 |
end; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
149 |
|
10935 | 150 |
function ipcReadToNet: TIPCMessage; |
151 |
begin |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
152 |
ipcReadToNet:= ipcRead(queueNet) |
10935 | 153 |
end; |
154 |
||
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
155 |
function ipcCheckFromEngine: boolean; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
156 |
begin |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
157 |
ipcCheckFromEngine:= ipcCheck(queueFrontend) |
10412 | 158 |
end; |
159 |
||
160 |
function ipcCheckFromFrontend: boolean; |
|
161 |
begin |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
162 |
ipcCheckFromFrontend:= ipcCheck(queueEngine) |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
163 |
end; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
164 |
|
10933 | 165 |
function engineListener(p: pointer): Longint; cdecl; export; |
10420 | 166 |
var msg: TIPCMessage; |
10416 | 167 |
begin |
10933 | 168 |
engineListener:= 0; |
10416 | 169 |
repeat |
10420 | 170 |
msg:= ipcReadFromEngine(); |
171 |
if msg.buf = nil then |
|
10935 | 172 |
callbackFunctionF(callbackPointerF, @msg.str[1], byte(msg.str[0])) |
10420 | 173 |
else |
174 |
begin |
|
10935 | 175 |
callbackFunctionF(callbackPointerF, msg.buf, msg.len); |
176 |
FreeMem(msg.buf, msg.len) |
|
177 |
end |
|
178 |
until false |
|
179 |
end; |
|
180 |
||
181 |
function netListener(p: pointer): Longint; cdecl; export; |
|
182 |
var msg: TIPCMessage; |
|
183 |
begin |
|
184 |
netListener:= 0; |
|
185 |
repeat |
|
186 |
msg:= ipcReadToNet(); |
|
187 |
if msg.buf = nil then |
|
188 |
callbackFunctionN(callbackPointerN, @msg.str[1], byte(msg.str[0])) |
|
189 |
else |
|
190 |
begin |
|
191 |
callbackFunctionN(callbackPointerN, msg.buf, msg.len); |
|
10420 | 192 |
FreeMem(msg.buf, msg.len) |
193 |
end |
|
10416 | 194 |
until false |
195 |
end; |
|
196 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
197 |
procedure registerIPCCallback(p: pointer; f: TIPCCallback); |
10416 | 198 |
begin |
10935 | 199 |
callbackPointerF:= p; |
200 |
callbackFunctionF:= f; |
|
11403 | 201 |
callbackListenerThreadF:= SDL_CreateThread(@engineListener, 'engineListener', nil); |
10935 | 202 |
end; |
203 |
||
204 |
procedure registerNetCallback(p: pointer; f: TIPCCallback); |
|
205 |
begin |
|
206 |
callbackPointerN:= p; |
|
207 |
callbackFunctionN:= f; |
|
11403 | 208 |
callbackListenerThreadN:= SDL_CreateThread(@netListener, 'netListener', nil); |
10416 | 209 |
end; |
210 |
||
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
211 |
function createQueue: PIPCQueue; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
212 |
var q: PIPCQueue; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
213 |
begin |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
214 |
new(q); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
215 |
q^.msg.str:= ''; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
216 |
q^.msg.buf:= nil; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
217 |
q^.mut:= SDL_CreateMutex; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
218 |
q^.cond:= SDL_CreateCond; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
219 |
q^.msg.next:= nil; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
220 |
q^.last:= @q^.msg; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
221 |
createQueue:= q |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
222 |
end; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
223 |
|
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
224 |
procedure destroyQueue(queue: PIPCQueue); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
225 |
begin |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
226 |
SDL_DestroyCond(queue^.cond); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
227 |
SDL_DestroyMutex(queue^.mut); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
228 |
dispose(queue); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
229 |
end; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
230 |
|
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
231 |
procedure initIPC; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
232 |
begin |
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
233 |
queueFrontend:= createQueue; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
234 |
queueEngine:= createQueue; |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
235 |
queueNet:= createQueue; |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
236 |
|
10935 | 237 |
callbackPointerF:= nil; |
238 |
callbackListenerThreadF:= nil; |
|
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
239 |
end; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
240 |
|
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
241 |
procedure freeIPC; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
242 |
begin |
11403 | 243 |
//FIXME SDL_KillThread(callbackListenerThreadF); |
244 |
//FIXME SDL_KillThread(callbackListenerThreadN); |
|
11450
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
245 |
destroyQueue(queueFrontend); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
246 |
destroyQueue(queueEngine); |
0c75fa9ce340
- Use queues instead of single buffer to communicate between threads
unc0rr
parents:
11418
diff
changeset
|
247 |
destroyQueue(queueNet); |
10410
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
248 |
end; |
669bfa55cd70
Some work on new IPC, built with the use of mutexes and condition variables
unc0rr
parents:
10406
diff
changeset
|
249 |
|
10406 | 250 |
end. |