diff options
Diffstat (limited to 'src/core/iomgr/iomgr.h')
-rw-r--r-- | src/core/iomgr/iomgr.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h index 56f0195be9..94f3912990 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/iomgr/iomgr.h @@ -34,15 +34,24 @@ #ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_H #define GRPC_INTERNAL_CORE_IOMGR_IOMGR_H +struct grpc_closure; +typedef struct grpc_closure grpc_closure; + +typedef struct grpc_call_list { + grpc_closure *head; + grpc_closure *tail; +} grpc_call_list; + /** gRPC Callback definition. * * \param arg Arbitrary input. * \param success An indication on the state of the iomgr. On false, cleanup * actions should be taken (eg, shutdown). */ -typedef void (*grpc_iomgr_cb_func)(void *arg, int success); +typedef void (*grpc_iomgr_cb_func)(void *arg, int success, + grpc_call_list *call_list); /** A closure over a grpc_iomgr_cb_func. */ -typedef struct grpc_closure { +struct grpc_closure { /** Bound callback. */ grpc_iomgr_cb_func cb; @@ -56,12 +65,7 @@ typedef struct grpc_closure { /**< Internal. Do not touch */ struct grpc_closure *next; -} grpc_closure; - -typedef struct grpc_call_list { - grpc_closure *head; - grpc_closure *tail; -} grpc_call_list; +}; /** Initializes \a closure with \a cb and \a cb_arg. */ void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, @@ -72,7 +76,7 @@ void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void grpc_call_list_add(grpc_call_list *list, grpc_closure *closure, int success); -void grpc_call_list_run(grpc_call_list list); +void grpc_call_list_run(grpc_call_list *list); void grpc_call_list_move(grpc_call_list *src, grpc_call_list *dst); int grpc_call_list_empty(grpc_call_list list); |