aboutsummaryrefslogtreecommitdiff
path: root/src/core/aio.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-10 15:02:38 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-10 15:02:38 -0700
commit795aebbee77bb74d8792df96dfe1aa79ec9548fc (patch)
tree58c16424c16b9e71cebdceaee4507ab6608f80da /src/core/aio.h
parentde90f97167d2df6739db47b2c6aad85f06250270 (diff)
downloadnng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.tar.gz
nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.tar.bz2
nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.zip
Give up on uncrustify; switch to clang-format.
Diffstat (limited to 'src/core/aio.h')
-rw-r--r--src/core/aio.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/core/aio.h b/src/core/aio.h
index ee2b084e..1b1f58e1 100644
--- a/src/core/aio.h
+++ b/src/core/aio.h
@@ -15,41 +15,41 @@
#include "core/taskq.h"
#include "core/thread.h"
-typedef struct nni_aio_ops nni_aio_ops;
+typedef struct nni_aio_ops nni_aio_ops;
// An nni_aio is an async I/O handle.
struct nni_aio {
- int a_result; // Result code (nng_errno)
- size_t a_count; // Bytes transferred (I/O only)
- nni_cb a_cb; // User specified callback.
- void * a_cbarg; // Callback argument.
- nni_time a_expire;
+ int a_result; // Result code (nng_errno)
+ size_t a_count; // Bytes transferred (I/O only)
+ nni_cb a_cb; // User specified callback.
+ void * a_cbarg; // Callback argument.
+ nni_time a_expire;
// These fields are private to the aio framework.
- nni_mtx a_lk;
- nni_cv a_cv;
- unsigned a_flags;
- nni_taskq_ent a_tqe;
+ nni_mtx a_lk;
+ nni_cv a_cv;
+ unsigned a_flags;
+ nni_taskq_ent a_tqe;
// Read/write operations.
- nni_iov a_iov[4];
- int a_niov;
+ nni_iov a_iov[4];
+ int a_niov;
// Message operations.
- nni_msg * a_msg;
+ nni_msg *a_msg;
// Connect/accept operations.
- void * a_endpt; // opaque endpoint handle
- void * a_pipe; // opaque pipe handle
+ void *a_endpt; // opaque endpoint handle
+ void *a_pipe; // opaque pipe handle
// Resolver operations.
- nni_sockaddr * a_addrs;
- int a_naddrs;
+ nni_sockaddr *a_addrs;
+ int a_naddrs;
// Provider-use fields.
- void (*a_prov_cancel)(nni_aio *);
- void * a_prov_data;
- nni_list_node a_prov_node;
+ void (*a_prov_cancel)(nni_aio *);
+ void * a_prov_data;
+ nni_list_node a_prov_node;
};
// nni_aio_init initializes an aio object. The callback is called with
@@ -95,14 +95,14 @@ extern void nni_aio_wait(nni_aio *);
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 *);
+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).
extern void nni_aio_finish(nni_aio *, int, size_t);
-extern int nni_aio_start(nni_aio *, void (*)(nni_aio *), void *);
+extern int nni_aio_start(nni_aio *, void (*)(nni_aio *), void *);
extern void nni_aio_stop(nni_aio *);
#endif // CORE_AIO_H