diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-05-25 16:38:23 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-05-29 16:02:37 -0700 |
| commit | a25ff30c96e41273cb8ac292667195f1861d4f50 (patch) | |
| tree | 5741a11b901b3e396913ac4f2c07c6123c8e04ec /src/platform/posix/posix_impl.h | |
| parent | 301de3ac5c7cf8a5eaaf3c58157251db781841d6 (diff) | |
| download | nng-a25ff30c96e41273cb8ac292667195f1861d4f50.tar.gz nng-a25ff30c96e41273cb8ac292667195f1861d4f50.tar.bz2 nng-a25ff30c96e41273cb8ac292667195f1861d4f50.zip | |
fixes #488 pthread mutex initializer could be simpler
The fallback logic was unnecessarily complicated, and found to be
somewhat data-racy; on modern systems initializing these things
never fails, and on BSD systems that only occurs under extreme
memory shortage.
Diffstat (limited to 'src/platform/posix/posix_impl.h')
| -rw-r--r-- | src/platform/posix/posix_impl.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h index 3616c69b..33a9c293 100644 --- a/src/platform/posix/posix_impl.h +++ b/src/platform/posix/posix_impl.h @@ -55,19 +55,12 @@ extern int nni_plat_errno(int); // elsewhere. struct nni_plat_mtx { - pthread_t owner; pthread_mutex_t mtx; - int fallback; - int flags; }; struct nni_plat_cv { pthread_cond_t cv; nni_plat_mtx * mtx; - int fallback; - int flags; - int gen; - int wake; }; struct nni_plat_thr { |
