diff options
author | Craig Tiller <ctiller@google.com> | 2017-09-01 10:30:11 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-09-01 10:30:11 -0700 |
commit | ee090ec9759fdef474a9a58d7c816676b9bfe6f1 (patch) | |
tree | 96d6eed3791596180f93831205dc048d1e8ec47b /src/core/lib/iomgr/exec_ctx.h | |
parent | 0f2f4eea4bdc32c7e229feba1d8867d4b6628185 (diff) | |
parent | b2b9a0ff7eacc84335b800e31b13a7607acf614b (diff) |
Merge github.com:grpc/grpc into wc
Diffstat (limited to 'src/core/lib/iomgr/exec_ctx.h')
-rw-r--r-- | src/core/lib/iomgr/exec_ctx.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index bb561ee1c8..0b183a3c9a 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -20,6 +20,7 @@ #define GRPC_CORE_LIB_IOMGR_EXEC_CTX_H #include <grpc/support/atm.h> +#include <grpc/support/cpu.h> #include "src/core/lib/iomgr/closure.h" @@ -66,6 +67,7 @@ struct grpc_exec_ctx { /** last active combiner in the active combiner list */ grpc_combiner *last_combiner; uintptr_t flags; + unsigned starting_cpu; void *check_ready_to_finish_arg; bool (*check_ready_to_finish)(grpc_exec_ctx *exec_ctx, void *arg); @@ -75,10 +77,10 @@ struct grpc_exec_ctx { /* initializer for grpc_exec_ctx: prefer to use GRPC_EXEC_CTX_INIT whenever possible */ -#define GRPC_EXEC_CTX_INITIALIZER(flags, finish_check, finish_check_arg) \ - { \ - GRPC_CLOSURE_LIST_INIT, NULL, NULL, flags, finish_check_arg, finish_check, \ - false, 0 \ +#define GRPC_EXEC_CTX_INITIALIZER(flags, finish_check, finish_check_arg) \ + { \ + GRPC_CLOSURE_LIST_INIT, NULL, NULL, flags, gpr_cpu_current_cpu(), \ + finish_check_arg, finish_check \ } /* initialize an execution context at the top level of an API call into grpc |