src/thread/win32/win_ce_semaphore.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 21 Sep 2009 08:58:51 +0000
branchSDL-1.2
changeset 4214 4250beeb5ad1
parent 36 13ee9f4834ea
child 1662 782fd950bd46
child 1895 c121d94672cb
permissions -rw-r--r--
Oh yeah, we have GLX support too.
slouken@36
     1
/* win_ce_semaphore.h - header file to go with win_ce_semaphore.c */
slouken@36
     2
slouken@36
     3
typedef struct _SYNCH_HANDLE_STRUCTURE {
slouken@36
     4
   HANDLE hEvent;
slouken@36
     5
   HANDLE hMutex;
slouken@36
     6
   HANDLE hSemph;
slouken@36
     7
   LONG MaxCount;
slouken@36
     8
   volatile LONG CurCount;
slouken@36
     9
   LPCTSTR lpName;
slouken@36
    10
} SYNCH_HANDLE_STRUCTURE, *SYNCHHANDLE;
slouken@36
    11
slouken@36
    12
#define SYNCH_HANDLE_SIZE sizeof (SYNCH_HANDLE_STRUCTURE)
slouken@36
    13
slouken@36
    14
        /* Error codes - all must have bit 29 set */
slouken@36
    15
#define SYNCH_ERROR 0X20000000   /* EXERCISE - REFINE THE ERROR NUMBERS */
slouken@36
    16
slouken@36
    17
extern SYNCHHANDLE CreateSemaphoreCE (LPSECURITY_ATTRIBUTES, LONG, LONG, LPCTSTR);
slouken@36
    18
slouken@36
    19
extern BOOL ReleaseSemaphoreCE (SYNCHHANDLE, LONG, LPLONG);
slouken@36
    20
extern DWORD WaitForSemaphoreCE (SYNCHHANDLE, DWORD);
slouken@36
    21
slouken@36
    22
extern BOOL CloseSynchHandle (SYNCHHANDLE);