From 7fdb900bc169f0105bf5fb2cd282f6448f3f11f7 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 4 Nov 1999 17:18:43 +0000 Subject: 1999-11-05 Ross Johnson * 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 --- implement.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'implement.h') diff --git a/implement.h b/implement.h index 70836dc..bc76dec 100644 --- a/implement.h +++ b/implement.h @@ -27,7 +27,8 @@ #ifndef _IMPLEMENT_H #define _IMPLEMENT_H -#define PT_STDCALL __stdcall +/* changed include from to use local file during development */ +#include "semaphore.h" #include @@ -315,6 +316,12 @@ extern CRITICAL_SECTION _pthread_mutex_test_init_lock; extern CRITICAL_SECTION _pthread_cond_test_init_lock; extern CRITICAL_SECTION _pthread_rwlock_test_init_lock; +/* Declared in misc.c */ +#ifdef NEED_CALLOC +#define calloc(n, s) _pthread_calloc(n, s) +void *_pthread_calloc(size_t n, size_t s); +#endif + #ifdef __cplusplus extern "C" { @@ -353,6 +360,12 @@ void _pthread_tkAssocDestroy (ThreadKeyAssoc * assoc); int _pthread_sem_timedwait (sem_t * sem, const struct timespec * abstime); +#ifdef NEED_SEM +void _pthread_decrease_semaphore(sem_t * sem); +BOOL _pthread_increase_semaphore(sem_t * sem, + unsigned int n); +#endif /* NEED_SEM */ + #ifdef __cplusplus } #endif /* __cplusplus */ @@ -365,7 +378,7 @@ int _pthread_sem_timedwait (sem_t * sem, * * Patch by Anders Norlander */ -#if defined(__CYGWIN32__) || defined(__CYGWIN__) +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(NEED_CREATETHREAD) /* * Macro uses args so we can cast start_proc to LPTHREAD_START_ROUTINE @@ -387,7 +400,7 @@ int _pthread_sem_timedwait (sem_t * sem, #define _endthreadex ExitThread -#endif /* __CYGWIN32__ || __CYGWIN__ */ +#endif /* __CYGWIN32__ || __CYGWIN__ || NEED_CREATETHREAD*/ #endif /* _IMPLEMENT_H */ -- cgit v1.2.3