From f0bf079dca01acb6dfc07af03226a0cae7a90010 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 1 Jan 2017 13:32:32 -0800 Subject: New thread infrastructure -- not used anywhere yet, but tested. --- src/platform/posix/posix_impl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/platform/posix/posix_impl.h') diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h index 2df96c71..5ca7812f 100644 --- a/src/platform/posix/posix_impl.h +++ b/src/platform/posix/posix_impl.h @@ -41,6 +41,23 @@ struct nni_cond { pthread_cond_t cv; pthread_mutex_t * mx; }; + +// These types are provided for here, to permit them to be directly inlined +// elsewhere. + +struct nni_plat_mtx { + pthread_mutex_t mtx; +}; + +struct nni_plat_thr { + pthread_t tid; +}; + +struct nni_plat_cv { + pthread_cond_t cv; + pthread_mutex_t *mtx; +}; + #endif #endif // PLATFORM_POSIX_IMPL_H -- cgit v1.2.3-70-g09d2