summaryrefslogtreecommitdiffstats
path: root/include/libusb-1.0/os/threads_posix.h
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-11-06 18:09:53 -0400
committerGravatar Joshua Hill2010-11-06 18:09:53 -0400
commitd82a73f1180a5f201397b92e6f6db33411cbe686 (patch)
treebcc7c4ba2e103770f905972854392d8c3e448f16 /include/libusb-1.0/os/threads_posix.h
parente89c9418e7072d5a1491055c8f78748bf82de49c (diff)
downloadlibirecovery-d82a73f1180a5f201397b92e6f6db33411cbe686.tar.gz
libirecovery-d82a73f1180a5f201397b92e6f6db33411cbe686.tar.bz2
updated libirecovery to the latest version from greenpois0n. it at least compiles on osx now, I need to test on other systems
Diffstat (limited to 'include/libusb-1.0/os/threads_posix.h')
-rw-r--r--include/libusb-1.0/os/threads_posix.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/libusb-1.0/os/threads_posix.h b/include/libusb-1.0/os/threads_posix.h
new file mode 100644
index 0000000..dc558d4
--- /dev/null
+++ b/include/libusb-1.0/os/threads_posix.h
@@ -0,0 +1,46 @@
+/*
+ * libusb synchronization using POSIX Threads
+ *
+ * Copyright (C) 2010 Peter Stuge <peter@stuge.se>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __LIBUSB_THREADS_POSIX_H__
+#define __LIBUSB_THREADS_POSIX_H__
+
+#include <pthread.h>
+
+#define usbi_mutex_static_t pthread_mutex_t
+#define USBI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+#define usbi_mutex_static_lock pthread_mutex_lock
+#define usbi_mutex_static_unlock pthread_mutex_unlock
+
+#define usbi_mutex_t pthread_mutex_t
+#define usbi_mutex_init pthread_mutex_init
+#define usbi_mutex_lock pthread_mutex_lock
+#define usbi_mutex_unlock pthread_mutex_unlock
+#define usbi_mutex_trylock pthread_mutex_trylock
+#define usbi_mutex_destroy pthread_mutex_destroy
+
+#define usbi_cond_t pthread_cond_t
+#define usbi_cond_init pthread_cond_init
+#define usbi_cond_wait pthread_cond_wait
+#define usbi_cond_timedwait pthread_cond_timedwait
+#define usbi_cond_broadcast pthread_cond_broadcast
+#define usbi_cond_destroy pthread_cond_destroy
+#define usbi_cond_signal pthread_cond_signal
+
+#endif /* __LIBUSB_THREADS_POSIX_H__ */