diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-17 08:13:39 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-17 08:13:39 -0700 |
commit | ec8eef42b8fea88c7f0c509c3734db4f6bd0049f (patch) | |
tree | 54e3b9498e6bc317544a8f19831ca26519455f0d /src/core/iomgr/exec_ctx.h | |
parent | 1e53411e04808eaa851a24dc8885b9a31fd12585 (diff) | |
parent | 0239ba8ebf20b3f1cf454ccbf8d9a3800ac9b8c9 (diff) |
Merge branch 'cleaner-posix2' into cleaner-posix3
Diffstat (limited to 'src/core/iomgr/exec_ctx.h')
-rw-r--r-- | src/core/iomgr/exec_ctx.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index 9a9b2e55fa..1b627a5dcf 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -36,6 +36,14 @@ #include "src/core/iomgr/closure.h" +/* #define GRPC_EXECUTION_CONTEXT_SANITIZER 1 */ + +/** A workqueue represents a list of work to be executed asynchronously. + Forward declared here to avoid a circular dependency with workqueue.h. */ +struct grpc_workqueue; +typedef struct grpc_workqueue grpc_workqueue; + +#ifndef GRPC_EXECUTION_CONTEXT_SANITIZER /** Execution context. * A bag of data that collects information along a callstack. * Generally created at public API entry points, and passed down as @@ -57,13 +65,15 @@ struct grpc_exec_ctx { grpc_closure_list closure_list; }; -/** A workqueue represents a list of work to be executed asynchronously. - Forward declared here to avoid a circular dependency with workqueue.h. */ -struct grpc_workqueue; -typedef struct grpc_workqueue grpc_workqueue; - #define GRPC_EXEC_CTX_INIT \ { GRPC_CLOSURE_LIST_INIT } +#else +struct grpc_exec_ctx { + int unused; +}; +#define GRPC_EXEC_CTX_INIT \ + { 0 } +#endif /** Flush any work that has been enqueued onto this grpc_exec_ctx. * Caller must guarantee that no interfering locks are held. @@ -82,4 +92,7 @@ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, grpc_closure_list *list, grpc_workqueue *offload_target_or_null); +void grpc_exec_ctx_global_init(void); +void grpc_exec_ctx_global_shutdown(void); + #endif |