aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_impl.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-22 02:19:18 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-22 02:19:18 -0800
commit6c1325a2b17548a4249d26a846bc32b95b7d747d (patch)
treececb3df7477d99a0380c5959a4e2f5afe5d03b5e /src/platform/posix/posix_impl.h
parent101c1b6a946d9f2f48c6dd89940ae669141e0511 (diff)
downloadnng-6c1325a2b17548a4249d26a846bc32b95b7d747d.tar.gz
nng-6c1325a2b17548a4249d26a846bc32b95b7d747d.tar.bz2
nng-6c1325a2b17548a4249d26a846bc32b95b7d747d.zip
Start of work to inline mutexes and condition variables.
Diffstat (limited to 'src/platform/posix/posix_impl.h')
-rw-r--r--src/platform/posix/posix_impl.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h
index 0a3151f3..a7b15edc 100644
--- a/src/platform/posix/posix_impl.h
+++ b/src/platform/posix/posix_impl.h
@@ -22,14 +22,17 @@
// Define types that this platform uses.
#ifdef PLATFORM_POSIX_SYNCH
+
+#include <pthread.h>
+
struct nni_mutex {
pthread_mutex_t mx;
-}
+};
-struct nni_condvar {
+struct nni_cond {
pthread_cond_t cv;
pthread_mutex_t * mx;
-}
+};
#endif
#endif // PLATFORM_POSIX_IMPL_H \ No newline at end of file