summaryrefslogtreecommitdiff
path: root/librabbitmq/win32/threads.h
diff options
context:
space:
mode:
authorAlan Antonuk <aega@med.umich.edu>2012-05-29 17:30:23 -0400
committerAlan Antonuk <aega@med.umich.edu>2012-05-29 17:30:23 -0400
commit62cb49534558f562ec8792eec74ce892b3e3529c (patch)
tree366ee21067b9cb292e764a6972c0de9c768cefee /librabbitmq/win32/threads.h
parenteff3e939a4200752b76a79585d1bc2d77afeca26 (diff)
downloadrabbitmq-c-github-ask-62cb49534558f562ec8792eec74ce892b3e3529c.tar.gz
Adding pthread shim for Win32 ENABLE_THREAD_SAFETY
Diffstat (limited to 'librabbitmq/win32/threads.h')
-rw-r--r--librabbitmq/win32/threads.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/librabbitmq/win32/threads.h b/librabbitmq/win32/threads.h
new file mode 100644
index 0000000..7cf6ca5
--- /dev/null
+++ b/librabbitmq/win32/threads.h
@@ -0,0 +1,14 @@
+#ifndef AMQP_THREAD_H
+#define AMQP_THREAD_H
+
+#include <Windows.h>
+
+typedef CRITICAL_SECTION *pthread_mutex_t;
+typedef int pthread_once_t;
+
+DWORD pthread_self(void);
+
+int pthread_mutex_init(pthread_mutex_t *, void *attr);
+int pthread_mutex_lock(pthread_mutex_t *);
+int pthread_mutex_unlock(pthread_mutex_t *);
+#endif /* AMQP_THREAD_H */