• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* win_ce_semaphore.h - header file to go with win_ce_semaphore.c */
2 
3 typedef struct _SYNCH_HANDLE_STRUCTURE {
4    HANDLE hEvent;
5    HANDLE hMutex;
6    HANDLE hSemph;
7    LONG MaxCount;
8    volatile LONG CurCount;
9    LPCTSTR lpName;
10 } SYNCH_HANDLE_STRUCTURE, *SYNCHHANDLE;
11 
12 #define SYNCH_HANDLE_SIZE sizeof (SYNCH_HANDLE_STRUCTURE)
13 
14         /* Error codes - all must have bit 29 set */
15 #define SYNCH_ERROR 0X20000000   /* EXERCISE - REFINE THE ERROR NUMBERS */
16 
17 extern SYNCHHANDLE CreateSemaphoreCE (LPSECURITY_ATTRIBUTES, LONG, LONG, LPCTSTR);
18 
19 extern BOOL ReleaseSemaphoreCE (SYNCHHANDLE, LONG, LPLONG);
20 extern DWORD WaitForSemaphoreCE (SYNCHHANDLE, DWORD);
21 
22 extern BOOL CloseSynchHandle (SYNCHHANDLE);
23