diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-07-11 13:03:54 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-07-11 13:04:28 -0700 |
| commit | ca41e1c52a2264a63dcf6604a49e29b1d4a221c6 (patch) | |
| tree | 4972c47d609594c596c2383b8ad2aaa2615a6962 /src/platform/posix/posix_impl.h | |
| parent | 9fcf039b573d153ba9bbc2beb5f11259ddacdcff (diff) | |
| download | nng-ca41e1c52a2264a63dcf6604a49e29b1d4a221c6.tar.gz nng-ca41e1c52a2264a63dcf6604a49e29b1d4a221c6.tar.bz2 nng-ca41e1c52a2264a63dcf6604a49e29b1d4a221c6.zip | |
fixes #1409 reader/writer lock desired
This provides the initial implementation, and converts the
transport lookup routines to use it. This is probably of limited
performance benefit, but rwlock's may be useful in further future work.
Diffstat (limited to 'src/platform/posix/posix_impl.h')
| -rw-r--r-- | src/platform/posix/posix_impl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h index 978afc01..851c80dc 100644 --- a/src/platform/posix/posix_impl.h +++ b/src/platform/posix/posix_impl.h @@ -1,5 +1,5 @@ // -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -58,6 +58,10 @@ struct nni_plat_mtx { pthread_mutex_t mtx; }; +struct nni_rwlock { + pthread_rwlock_t rwl; +}; + struct nni_plat_cv { pthread_cond_t cv; nni_plat_mtx * mtx; |
