From 4bc3463108a7675b24d6f826acf6b2f472a615f5 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 7 Oct 2015 16:12:35 -0700 Subject: Introducing grpc_executor, for all your threading needs --- src/core/iomgr/closure.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/iomgr/closure.h') diff --git a/src/core/iomgr/closure.h b/src/core/iomgr/closure.h index 982ffa4e1b..709ef1afe9 100644 --- a/src/core/iomgr/closure.h +++ b/src/core/iomgr/closure.h @@ -80,9 +80,18 @@ void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, #define GRPC_CLOSURE_LIST_INIT \ { NULL, NULL } +/** add \a closure to the end of \a list and set \a closure's success to \a + * success */ void grpc_closure_list_add(grpc_closure_list *list, grpc_closure *closure, int success); + +/** append all closures from \a src to \a dst and empty \a src. */ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst); + +/** pop (return and remove) the head closure from \a list. */ +grpc_closure *grpc_closure_list_pop(grpc_closure_list *list); + +/** return whether \a list is empty. */ int grpc_closure_list_empty(grpc_closure_list list); #endif /* GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H */ -- cgit v1.2.3