From dcd966ba50fa18853c5ae06125a5b08b0ee6b10d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 3 Aug 2005 01:48:35 +0000 Subject: Language Fixes and Improvements - rccmutex - Language autodetection fixes and improvements - Language translation fixes and improvements - The current state is near to be usable --- src/rccmutex.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/rccmutex.h (limited to 'src/rccmutex.h') diff --git a/src/rccmutex.h b/src/rccmutex.h new file mode 100644 index 0000000..8585621 --- /dev/null +++ b/src/rccmutex.h @@ -0,0 +1,27 @@ +#ifndef _RCC_MUTEX_H +#define _RCC_MUTEX_H + +#include "../config.h" + +#ifdef HAVE_PTHREAD +# include +#endif /* HAVE_PTHREAD */ + +struct rcc_mutex_t { +#ifdef HAVE_PTHREAD + pthread_mutex_t mutex; +#else + unsigned char mutex; +#endif /* HAVE_PTHREAD */ +}; +typedef struct rcc_mutex_t rcc_mutex_s; +typedef struct rcc_mutex_t *rcc_mutex; + +rcc_mutex rccMutexCreate(); +void rccMutexFree(rcc_mutex mutex); + +int rccMutexLock(rcc_mutex mutex); +int rccMutexTryLock(rcc_mutex mutex); +void rccMutexUnLock(rcc_mutex mutex); + +#endif /* _RCC_MUTEX_H */ -- cgit v1.2.3