source: trunk/include/odincrt.h@ 10567

Last change on this file since 10567 was 10533, checked in by sandervl, 21 years ago

VP: Critical section update

File size: 1.2 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
19ULONG WIN32API DosValidateCriticalSection (CRITICAL_SECTION_OS2 *crit);
20ULONG WIN32API DosDeleteCriticalSection(CRITICAL_SECTION_OS2 *);
21ULONG WIN32API DosEnterCriticalSection(CRITICAL_SECTION_OS2 *, ULONG ulTimeout = SEM_INDEFINITE_WAIT);
22ULONG WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *, char *pszSemName, BOOL fShared = FALSE);
23ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *, char *pszSemName);
24ULONG WIN32API DosLeaveCriticalSection(CRITICAL_SECTION_OS2 *);
25
26LONG WIN32API DosInterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare );
27LONG WIN32API DosInterlockedDecrement(LPLONG);
28LONG WIN32API DosInterlockedExchange(LPLONG,LONG);
29LONG WIN32API DosInterlockedExchangeAdd( PLONG dest, LONG incr );
30LONG WIN32API DosInterlockedIncrement(LPLONG);
31
32
33#endif //__ODINCRT_H__
Note: See TracBrowser for help on using the repository browser.