diff options
Diffstat (limited to 'src/core/lib/iomgr/closure.cc')
-rw-r--r-- | src/core/lib/iomgr/closure.cc | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/core/lib/iomgr/closure.cc b/src/core/lib/iomgr/closure.cc index 00edefc6ae..60e99d0e4e 100644 --- a/src/core/lib/iomgr/closure.cc +++ b/src/core/lib/iomgr/closure.cc @@ -29,14 +29,14 @@ grpc_tracer_flag grpc_trace_closure = GRPC_TRACER_INITIALIZER(false, "closure"); #endif #ifndef NDEBUG -grpc_closure *grpc_closure_init(const char *file, int line, - grpc_closure *closure, grpc_iomgr_cb_func cb, - void *cb_arg, - grpc_closure_scheduler *scheduler) { +grpc_closure* grpc_closure_init(const char* file, int line, + grpc_closure* closure, grpc_iomgr_cb_func cb, + void* cb_arg, + grpc_closure_scheduler* scheduler) { #else -grpc_closure *grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, - void *cb_arg, - grpc_closure_scheduler *scheduler) { +grpc_closure* grpc_closure_init(grpc_closure* closure, grpc_iomgr_cb_func cb, + void* cb_arg, + grpc_closure_scheduler* scheduler) { #endif closure->cb = cb; closure->cb_arg = cb_arg; @@ -52,12 +52,12 @@ grpc_closure *grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, return closure; } -void grpc_closure_list_init(grpc_closure_list *closure_list) { +void grpc_closure_list_init(grpc_closure_list* closure_list) { closure_list->head = closure_list->tail = NULL; } -bool grpc_closure_list_append(grpc_closure_list *closure_list, - grpc_closure *closure, grpc_error *error) { +bool grpc_closure_list_append(grpc_closure_list* closure_list, + grpc_closure* closure, grpc_error* error) { if (closure == NULL) { GRPC_ERROR_UNREF(error); return false; @@ -74,9 +74,9 @@ bool grpc_closure_list_append(grpc_closure_list *closure_list, return was_empty; } -void grpc_closure_list_fail_all(grpc_closure_list *list, - grpc_error *forced_failure) { - for (grpc_closure *c = list->head; c != NULL; c = c->next_data.next) { +void grpc_closure_list_fail_all(grpc_closure_list* list, + grpc_error* forced_failure) { + for (grpc_closure* c = list->head; c != NULL; c = c->next_data.next) { if (c->error_data.error == GRPC_ERROR_NONE) { c->error_data.error = GRPC_ERROR_REF(forced_failure); } @@ -88,7 +88,7 @@ bool grpc_closure_list_empty(grpc_closure_list closure_list) { return closure_list.head == NULL; } -void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst) { +void grpc_closure_list_move(grpc_closure_list* src, grpc_closure_list* dst) { if (src->head == NULL) { return; } @@ -103,28 +103,28 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst) { typedef struct { grpc_iomgr_cb_func cb; - void *cb_arg; + void* cb_arg; grpc_closure wrapper; } wrapped_closure; -static void closure_wrapper(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - wrapped_closure *wc = (wrapped_closure *)arg; +static void closure_wrapper(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + wrapped_closure* wc = (wrapped_closure*)arg; grpc_iomgr_cb_func cb = wc->cb; - void *cb_arg = wc->cb_arg; + void* cb_arg = wc->cb_arg; gpr_free(wc); cb(exec_ctx, cb_arg, error); } #ifndef NDEBUG -grpc_closure *grpc_closure_create(const char *file, int line, - grpc_iomgr_cb_func cb, void *cb_arg, - grpc_closure_scheduler *scheduler) { +grpc_closure* grpc_closure_create(const char* file, int line, + grpc_iomgr_cb_func cb, void* cb_arg, + grpc_closure_scheduler* scheduler) { #else -grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg, - grpc_closure_scheduler *scheduler) { +grpc_closure* grpc_closure_create(grpc_iomgr_cb_func cb, void* cb_arg, + grpc_closure_scheduler* scheduler) { #endif - wrapped_closure *wc = (wrapped_closure *)gpr_malloc(sizeof(*wc)); + wrapped_closure* wc = (wrapped_closure*)gpr_malloc(sizeof(*wc)); wc->cb = cb; wc->cb_arg = cb_arg; #ifndef NDEBUG @@ -136,11 +136,11 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg, } #ifndef NDEBUG -void grpc_closure_run(const char *file, int line, grpc_exec_ctx *exec_ctx, - grpc_closure *c, grpc_error *error) { +void grpc_closure_run(const char* file, int line, grpc_exec_ctx* exec_ctx, + grpc_closure* c, grpc_error* error) { #else -void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, - grpc_error *error) { +void grpc_closure_run(grpc_exec_ctx* exec_ctx, grpc_closure* c, + grpc_error* error) { #endif GPR_TIMER_BEGIN("grpc_closure_run", 0); if (c != NULL) { @@ -158,11 +158,11 @@ void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, } #ifndef NDEBUG -void grpc_closure_sched(const char *file, int line, grpc_exec_ctx *exec_ctx, - grpc_closure *c, grpc_error *error) { +void grpc_closure_sched(const char* file, int line, grpc_exec_ctx* exec_ctx, + grpc_closure* c, grpc_error* error) { #else -void grpc_closure_sched(grpc_exec_ctx *exec_ctx, grpc_closure *c, - grpc_error *error) { +void grpc_closure_sched(grpc_exec_ctx* exec_ctx, grpc_closure* c, + grpc_error* error) { #endif GPR_TIMER_BEGIN("grpc_closure_sched", 0); if (c != NULL) { @@ -189,14 +189,14 @@ void grpc_closure_sched(grpc_exec_ctx *exec_ctx, grpc_closure *c, } #ifndef NDEBUG -void grpc_closure_list_sched(const char *file, int line, - grpc_exec_ctx *exec_ctx, grpc_closure_list *list) { +void grpc_closure_list_sched(const char* file, int line, + grpc_exec_ctx* exec_ctx, grpc_closure_list* list) { #else -void grpc_closure_list_sched(grpc_exec_ctx *exec_ctx, grpc_closure_list *list) { +void grpc_closure_list_sched(grpc_exec_ctx* exec_ctx, grpc_closure_list* list) { #endif - grpc_closure *c = list->head; + grpc_closure* c = list->head; while (c != NULL) { - grpc_closure *next = c->next_data.next; + grpc_closure* next = c->next_data.next; #ifndef NDEBUG if (c->scheduled) { gpr_log(GPR_ERROR, |