diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/aio.c | 7 | ||||
| -rw-r--r-- | src/core/aio.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/core/aio.c b/src/core/aio.c index 141499e2..cec2ff7c 100644 --- a/src/core/aio.c +++ b/src/core/aio.c @@ -321,6 +321,13 @@ nni_aio_list_append(nni_list *list, nni_aio *aio) } void +nni_aio_list_prepend(nni_list *list, nni_aio *aio) +{ + nni_aio_list_remove(aio); + nni_list_prepend(list, aio); +} + +void nni_aio_list_remove(nni_aio *aio) { nni_list_node_remove(&aio->a_prov_node); diff --git a/src/core/aio.h b/src/core/aio.h index 14af4efc..b12fcc55 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -151,6 +151,7 @@ extern void nni_aio_wait(nni_aio *); // 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_prepend(nni_list *, nni_aio *); extern void nni_aio_list_remove(nni_aio *); extern int nni_aio_list_active(nni_aio *); |
