diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-04 13:04:38 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-04 13:04:38 -0700 |
| commit | 58c5fbb731f50a952864bc500a8efd3b7077ee65 (patch) | |
| tree | bff20e9758e04c024ef26288dff0f4edb89cf033 /src/core/aio.h | |
| parent | 5b45db0aeb1026fcf7bbdec0e6451d1cfaac58f1 (diff) | |
| download | nng-58c5fbb731f50a952864bc500a8efd3b7077ee65.tar.gz nng-58c5fbb731f50a952864bc500a8efd3b7077ee65.tar.bz2 nng-58c5fbb731f50a952864bc500a8efd3b7077ee65.zip | |
Improved routines for list management.
Diffstat (limited to 'src/core/aio.h')
| -rw-r--r-- | src/core/aio.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/aio.h b/src/core/aio.h index 73fdf260..d3c238f6 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -88,6 +88,15 @@ extern void nni_aio_wake(nni_aio *); // block the caller indefinitely. extern void nni_aio_wait(nni_aio *); +// nni_aio_list_init creates a list suitable for use by providers using +// the a_prov_node member of the aio. These operations are not locked, +// but they do have some extra checks -- remove is idempotent for example, +// and append will perform any necessary remove first. +extern void nni_aio_list_init(nni_list *); +extern void nni_aio_list_append(nni_list *, nni_aio *); +extern void nni_aio_list_remove(nni_aio *); +extern int nni_aio_list_active(nni_aio *); + // nni_aio_finish is called by the provider when an operation is complete. // The provider gives the result code (0 for success, an NNG errno otherwise), // and the amount of data transferred (if any). |
