source: trunk/include/odincrt.h@ 22145

Last change on this file since 22145 was 21916, checked in by dmik, 14 years ago

Merge branch gcc-kmk to trunk.

File size: 1.4 KB
Line 
1#ifndef __ODINCRT_H__
2#define __ODINCRT_H__
3
4#include <win32type.h>
5
6#ifndef SEM_INDEFINITE_WAIT
7#define SEM_INDEFINITE_WAIT -1
8#endif
9
10typedef struct {
11 LONG LockCount;
12 LONG RecursionCount;
13 ULONG OwningThread;
14 ULONG hevLock;
15 ULONG Reserved;
16 LONG CreationCount;
17} CRITICAL_SECTION_OS2, *PCRITICAL_SECTION_OS2;
18
19#ifndef OS2_INCLUDED
20typedef const char *PCSZ;
21#endif
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27ULONG WIN32API DosValidateCriticalSection (CRITICAL_SECTION_OS2 *crit);
28ULONG WIN32API DosDeleteCriticalSection(CRITICAL_SECTION_OS2 *);
29ULONG WIN32API DosEnterCriticalSection(CRITICAL_SECTION_OS2 *, ULONG ulTimeout = SEM_INDEFINITE_WAIT);
30ULONG WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *, PCSZ pszSemName, BOOL fShared = FALSE);
31ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *, PCSZ pszSemName);
32ULONG WIN32API DosLeaveCriticalSection(CRITICAL_SECTION_OS2 *);
33
34LONG WIN32API DosInterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare );
35LONG WIN32API DosInterlockedDecrement(LPLONG);
36LONG WIN32API DosInterlockedExchange(LPLONG,LONG);
37LONG WIN32API DosInterlockedExchangeAdd( PLONG dest, LONG incr );
38LONG WIN32API DosInterlockedIncrement(LPLONG);
39
40#ifdef OS2_INCLUDED
41APIRET WIN32API DosQueryModuleHandleStrict(PCSZ pszModname, PHMODULE pHmod);
42#endif
43
44#ifdef __cplusplus
45} // extern "C"
46#endif
47
48#endif //__ODINCRT_H__
Note: See TracBrowser for help on using the repository browser.