summaryrefslogtreecommitdiffstats
path: root/src/rccmutex.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-03 01:48:35 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-03 01:48:35 +0000
commitdcd966ba50fa18853c5ae06125a5b08b0ee6b10d (patch)
tree8147928dbe65fc6b4d83e5cc15d1b3ac5993e0eb /src/rccmutex.h
parent8b75f9bb6a09d54d634ff661655659951378aa2c (diff)
downloadlibrcc-dcd966ba50fa18853c5ae06125a5b08b0ee6b10d.tar.gz
librcc-dcd966ba50fa18853c5ae06125a5b08b0ee6b10d.tar.bz2
librcc-dcd966ba50fa18853c5ae06125a5b08b0ee6b10d.tar.xz
librcc-dcd966ba50fa18853c5ae06125a5b08b0ee6b10d.zip
Language Fixes and Improvements
- rccmutex - Language autodetection fixes and improvements - Language translation fixes and improvements - The current state is near to be usable
Diffstat (limited to 'src/rccmutex.h')
-rw-r--r--src/rccmutex.h27
1 files changed, 27 insertions, 0 deletions
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 <pthread.h>
+#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 */