PageRenderTime 65ms CodeModel.GetById 48ms app.highlight 7ms RepoModel.GetById 4ms app.codeStats 0ms

/packages/libogcfpc/src/ogc/lwp_sema.inc

https://github.com/slibre/freepascal
Pascal | 45 lines | 28 code | 12 blank | 5 comment | 0 complexity | 4c00000b306e0c262280513eac587ae8 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1
 2{$IFDEF OGC_INTERFACE}
 3const
 4  LWP_SEMA_MODEFIFO = 0;
 5  LWP_SEMA_MODEPRIORITY = 1;
 6  LWP_SEMA_SUCCESSFUL = 0;
 7  LWP_SEMA_UNSATISFIED_NOWAIT = 1;
 8  LWP_SEMA_DELETED = 2;
 9  LWP_SEMA_TIMEOUT = 3;
10  LWP_SEMA_MAXCNT_EXCEEDED = 4;
11
12type
13  _lwpsemattr = record
14    max_cnt : cuint32;
15    mode : cuint32;
16  end;
17  lwp_semattr = _lwpsemattr;
18  Plwp_semattr = ^lwp_semattr;
19
20
21  _lwpsema = record
22    wait_queue : lwp_thrqueue;
23    attrs : lwp_semattr;
24    count : cuint32;
25  end;
26  lwp_sema = _lwpsema;
27  Plwp_sema = ^lwp_sema;
28
29
30procedure __lwp_sema_initialize(sema: Plwp_sema; attrs: Plwp_semattr;
31  init_count: cuint32); cdecl; external;
32
33function __lwp_sema_surrender(sema: Plwp_sema; id: cuint32): cuint32; cdecl; external;
34
35function __lwp_sema_seize(sema: Plwp_sema; id, wait: cuint32; timeout: cuint64)
36  : cuint32; cdecl; external;
37
38procedure __lwp_sema_flush(sema: Plwp_sema; status: cuint32); cdecl; external;
39
40
41//#ifdef LIBOGC_INTERNAL
42//#include <libogc/lwp_sema.inl>
43//#endif
44{$ENDIF}
45