diff options
Diffstat (limited to 'grpc/src/core/lib/iomgr/closure.h')
-rw-r--r-- | grpc/src/core/lib/iomgr/closure.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/grpc/src/core/lib/iomgr/closure.h b/grpc/src/core/lib/iomgr/closure.h index 6bb65340..b429c9e3 100644 --- a/grpc/src/core/lib/iomgr/closure.h +++ b/grpc/src/core/lib/iomgr/closure.h @@ -50,7 +50,7 @@ typedef struct grpc_closure_list { * describing what went wrong. * Error contract: it is not the cb's job to unref this error; * the closure scheduler will do that after the cb returns */ -typedef void (*grpc_iomgr_cb_func)(void* arg, grpc_error* error); +typedef void (*grpc_iomgr_cb_func)(void* arg, grpc_error_handle error); /** A closure over a grpc_iomgr_cb_func. */ struct grpc_closure { @@ -72,7 +72,7 @@ struct grpc_closure { /** Once queued, the result of the closure. Before then: scratch space */ union { - grpc_error* error; + grpc_error_handle error; uintptr_t scratch; } error_data; @@ -126,7 +126,7 @@ struct wrapped_closure { void* cb_arg; grpc_closure wrapper; }; -inline void closure_wrapper(void* arg, grpc_error* error) { +inline void closure_wrapper(void* arg, grpc_error_handle error) { wrapped_closure* wc = static_cast<wrapped_closure*>(arg); grpc_iomgr_cb_func cb = wc->cb; void* cb_arg = wc->cb_arg; @@ -175,7 +175,8 @@ inline void grpc_closure_list_init(grpc_closure_list* closure_list) { and set \a closure's result to \a error Returns true if \a list becomes non-empty */ inline bool grpc_closure_list_append(grpc_closure_list* closure_list, - grpc_closure* closure, grpc_error* error) { + grpc_closure* closure, + grpc_error_handle error) { if (closure == nullptr) { GRPC_ERROR_UNREF(error); return false; @@ -194,7 +195,7 @@ inline bool grpc_closure_list_append(grpc_closure_list* closure_list, /** force all success bits in \a list to false */ inline void grpc_closure_list_fail_all(grpc_closure_list* list, - grpc_error* forced_failure) { + grpc_error_handle forced_failure) { for (grpc_closure* c = list->head; c != nullptr; c = c->next_data.next) { if (c->error_data.error == GRPC_ERROR_NONE) { c->error_data.error = GRPC_ERROR_REF(forced_failure); @@ -227,7 +228,7 @@ namespace grpc_core { class Closure { public: static void Run(const DebugLocation& location, grpc_closure* closure, - grpc_error* error) { + grpc_error_handle error) { (void)location; if (closure == nullptr) { GRPC_ERROR_UNREF(error); |