Last change
on this file was 8903, checked in by sandervl, 23 years ago |
added vsemaphore class that was removed from kernel32
|
File size:
712 bytes
|
Rev | Line | |
---|
[8903] | 1 | /* $Id: vsemaphore.h,v 1.1 2002-07-22 09:53:48 sandervl Exp $ */
|
---|
| 2 |
|
---|
| 3 | /*
|
---|
| 4 | *
|
---|
| 5 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 6 | *
|
---|
| 7 | */
|
---|
| 8 | #ifndef __VSEMAPHORE_H__
|
---|
| 9 | #define __VSEMAPHORE_H__
|
---|
| 10 |
|
---|
| 11 | #define VSEMAPHORE_RETURN_IMM 0
|
---|
| 12 | #define VSEMAPHORE_WAIT_FOREVER -1
|
---|
| 13 |
|
---|
| 14 | #define VSEMAPHORE_NONSHARED 0
|
---|
| 15 | #define VSEMAPHORE_SHARED 1
|
---|
| 16 |
|
---|
| 17 | #ifdef _OS2WIN_H
|
---|
| 18 | #define HEV DWORD
|
---|
| 19 | #endif
|
---|
| 20 |
|
---|
| 21 | class VSemaphore
|
---|
| 22 | {
|
---|
| 23 | public:
|
---|
| 24 | VSemaphore (int fShared = VSEMAPHORE_NONSHARED, HEV *phSem = NULL);
|
---|
| 25 | ~VSemaphore();
|
---|
| 26 |
|
---|
| 27 | public:
|
---|
| 28 | VOID wait(ULONG timeout = VSEMAPHORE_WAIT_FOREVER, HEV *phSem = NULL);
|
---|
| 29 | VOID post(HEV *phSem = NULL);
|
---|
| 30 | VOID reset(HEV *phSem = NULL);
|
---|
| 31 |
|
---|
| 32 | protected:
|
---|
| 33 | HEV sem_handle;
|
---|
| 34 | BOOL fShared;
|
---|
| 35 | };
|
---|
| 36 |
|
---|
| 37 | #endif //__VSEMAPHORE_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.