diff options
author | rpj <rpj> | 1999-11-04 17:18:43 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-11-04 17:18:43 +0000 |
commit | 7fdb900bc169f0105bf5fb2cd282f6448f3f11f7 (patch) | |
tree | 3f3c80cb9efa420e259c407a28b77713985ca23b /semaphore.h | |
parent | efa438832bc1343c08c334e88aec4266040ddec3 (diff) |
1999-11-05 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* general: Patched for portability to WinCE. The details are
described in the file WinCE-PORT. Follow the instructions
in README.WinCE to make the appropriate changes in config.h.
- Tristan Savatier <tristan@mpegtv.com>
Diffstat (limited to 'semaphore.h')
-rw-r--r-- | semaphore.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/semaphore.h b/semaphore.h index fb475a0..8af8be8 100644 --- a/semaphore.h +++ b/semaphore.h @@ -28,8 +28,11 @@ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H -#include <process.h> +#ifdef NEED_ERRNO +#include "need_errno.h" +#else #include <errno.h> +#endif #define _POSIX_SEMAPHORES @@ -42,7 +45,15 @@ extern "C" typedef unsigned int mode_t; #endif +#ifdef NEED_SEM +typedef struct { + unsigned int value; + pthread_mutex_t mutex; + HANDLE event; +} sem_t; +#else /* NEED_SEM */ typedef HANDLE sem_t; +#endif /* NEED_SEM */ int sem_init (sem_t * sem, int pshared, |