src/thread/win32/win_ce_semaphore.h
author Sam Lantinga
Tue, 26 Aug 2008 07:34:23 +0000
changeset 2727 76c2fc9696ea
parent 1895 c121d94672cb
permissions -rw-r--r--
Fixed crash when tablet isn't detected properly
slouken@36
     1
/* win_ce_semaphore.h - header file to go with win_ce_semaphore.c */
slouken@36
     2
slouken@1895
     3
typedef struct _SYNCH_HANDLE_STRUCTURE
slouken@1895
     4
{
slouken@1895
     5
    HANDLE hEvent;
slouken@1895
     6
    HANDLE hMutex;
slouken@1895
     7
    HANDLE hSemph;
slouken@1895
     8
    LONG MaxCount;
slouken@1895
     9
    volatile LONG CurCount;
slouken@1895
    10
    LPCTSTR lpName;
slouken@36
    11
} SYNCH_HANDLE_STRUCTURE, *SYNCHHANDLE;
slouken@36
    12
slouken@36
    13
#define SYNCH_HANDLE_SIZE sizeof (SYNCH_HANDLE_STRUCTURE)
slouken@36
    14
slouken@36
    15
        /* Error codes - all must have bit 29 set */
slouken@1895
    16
#define SYNCH_ERROR 0X20000000  /* EXERCISE - REFINE THE ERROR NUMBERS */
slouken@36
    17
slouken@1895
    18
extern SYNCHHANDLE CreateSemaphoreCE(LPSECURITY_ATTRIBUTES, LONG, LONG,
slouken@1895
    19
                                     LPCTSTR);
slouken@36
    20
slouken@1895
    21
extern BOOL ReleaseSemaphoreCE(SYNCHHANDLE, LONG, LPLONG);
slouken@1895
    22
extern DWORD WaitForSemaphoreCE(SYNCHHANDLE, DWORD);
slouken@36
    23
slouken@1895
    24
extern BOOL CloseSynchHandle(SYNCHHANDLE);
slouken@1895
    25
/* vi: set ts=4 sw=4 expandtab: */