PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/libogcfpc/src/ogc/lwp.inc

https://github.com/slibre/freepascal
Pascal | 52 lines | 30 code | 20 blank | 2 comment | 0 complexity | 4f16aa1b53450a5da360b8afa9804756 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1{$IFDEF OGC_INTERFACE}
 2const
 3  LWP_CLOSED = - 1;
 4  LWP_SUCCESSFUL = 0;
 5  LWP_ALREADY_SUSPENDED = 1;
 6  LWP_NOT_SUSPENDED = 2;
 7  LWP_PRIO_IDLE = 0;
 8  LWP_PRIO_HIGHEST = 127;
 9  LWP_THREAD_NULL = $ffffffff;
10  LWP_TQUEUE_NULL = $ffffffff;
11
12type
13  lwp_t = cuint32;
14  Plwp_t = ^lwp_t;
15
16  lwpq_t = cuint32;
17  Plwpq_t = ^lwpq_t;
18
19  TAuxCallback = function(par0: pointer): pointer; cdecl;
20
21function LWP_CreateThread(thethread: Plwp_t; entry: TAuxCallback;
22  arg, stackbase: pointer; stack_size: cuint32; prio: cuint8): cint32; cdecl; external;
23
24
25function LWP_SuspendThread(thethread: lwp_t): cint32; cdecl; external;
26
27function LWP_ResumeThread(thethread: lwp_t): cint32; cdecl; external;
28
29function LWP_ThreadIsSuspended(thethread: lwp_t): cbool; cdecl; external;
30
31function LWP_GetSelf: lwp_t; cdecl; external;
32
33
34procedure LWP_SetThreadPriority(thethread: lwp_t; prio: cuint32); cdecl; external;
35
36procedure LWP_YieldThread; cdecl; external;
37
38procedure LWP_Reschedule(prio: cuint32); cdecl; external;
39
40function LWP_JoinThread(thethread: lwp_t; value_ptr: Ppointer): cint32; cdecl; external;
41
42function LWP_InitQueue(thequeue: Plwpq_t): cint32; cdecl; external;
43
44procedure LWP_CloseQueue(thequeue: lwpq_t); cdecl; external;
45
46function LWP_ThreadSleep(thequeue: lwpq_t): cint32; cdecl; external;
47
48procedure LWP_ThreadSignal(thequeue: lwpq_t); cdecl; external;
49
50procedure LWP_ThreadBroadcast(thequeue: lwpq_t); cdecl; external;
51{$ENDIF OGC_INTERFACE}
52