Subversion Repositories Kolibri OS

Rev

Rev 616 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 616 Rev 619
Line 144... Line 144...
144
    Arg: Pointer;
144
    Arg: Pointer;
145
    StackSize: PtrUInt;
145
    StackSize: PtrUInt;
146
    Stack: Pointer;
146
    Stack: Pointer;
147
  end;
147
  end;
Line 148... Line -...
148
 
-
 
149
procedure DoneThread;
-
 
150
begin
-
 
151
  SysReleaseThreadVars;
-
 
Line 152... Line 148...
152
end;
148
 
153
 
149
 
154
procedure ThreadMain(ThreadInfo: PThreadInfo);
150
procedure ThreadMain(ThreadInfo: PThreadInfo);
155
var
151
var
Line 289... Line 285...
289
procedure SysRTLEventDestroy(State: PRTLEvent);
285
procedure SysRTLEventDestroy(State: PRTLEvent);
290
begin
286
begin
291
end;
287
end;
Line 292... Line -...
292
 
-
 
293
 
-
 
294
 
-
 
295
{$ifndef HAS_MT_MEMORYMANAGER}
-
 
296
var
-
 
297
  HeapMutex: TRTLCriticalSection;
-
 
298
 
-
 
299
procedure KosHeapMutexInit;
-
 
300
begin
-
 
301
  InitCriticalSection(HeapMutex);
-
 
302
end;
-
 
303
 
-
 
304
procedure KosHeapMutexDone;
-
 
305
begin
-
 
306
  DoneCriticalSection(HeapMutex);
-
 
307
end;
-
 
308
 
-
 
309
procedure KosHeapMutexLock;
-
 
310
begin
-
 
311
  EnterCriticalSection(HeapMutex);
-
 
312
end;
-
 
313
 
-
 
314
procedure KosHeapMutexUnlock;
-
 
315
begin
-
 
316
  LeaveCriticalSection(HeapMutex);
-
 
317
end;
-
 
318
 
-
 
319
const
-
 
320
  KosMemoryMutexManager: TMemoryMutexManager = (
-
 
321
    MutexInit: @KosHeapMutexInit;
-
 
322
    MutexDone: @KosHeapMutexDone;
-
 
323
    MutexLock: @KosHeapMutexLock;
-
 
324
    MutexUnlock: @KosHeapMutexUnlock);
-
 
325
 
-
 
326
procedure InitHeapMutexes;
-
 
327
begin
-
 
328
  SetMemoryMutexManager(KosMemoryMutexManager);
-
 
329
end;
-
 
330
{$endif HAS_MT_MEMORYMANAGER}
-
 
331
 
288
 
332
 
289
 
Line 333... Line 290...
333
var
290
var
334
  KosThreadManager: TThreadManager;
291
  KosThreadManager: TThreadManager;
Line 377... Line 334...
377
    SemaphoreDestroy       := @NoSemaphoreDestroy;
334
    SemaphoreDestroy       := @NoSemaphoreDestroy;
378
    SemaphoreWait          := @NoSemaphoreWait;
335
    SemaphoreWait          := @NoSemaphoreWait;
379
    SemaphorePost          := @NoSemaphorePost;
336
    SemaphorePost          := @NoSemaphorePost;
380
  end;
337
  end;
381
  SetThreadManager(KosThreadManager);
338
  SetThreadManager(KosThreadManager);
382
{$ifndef HAS_MT_MEMORYMANAGER}
-
 
383
  InitHeapMutexes;
-
 
384
{$endif HAS_MT_MEMORYMANAGER}
-
 
385
  ThreadID := GetCurrentThreadID;
339
  ThreadID := GetCurrentThreadID;
386
end;
340
end;