diff options
Diffstat (limited to 'src/core/lib/iomgr/block_annotate.h')
-rw-r--r-- | src/core/lib/iomgr/block_annotate.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/core/lib/iomgr/block_annotate.h b/src/core/lib/iomgr/block_annotate.h index fcbfe9eb1a..55bde3eaac 100644 --- a/src/core/lib/iomgr/block_annotate.h +++ b/src/core/lib/iomgr/block_annotate.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_BLOCK_ANNOTATE_H #define GRPC_CORE_LIB_IOMGR_BLOCK_ANNOTATE_H +#include "src/core/lib/iomgr/exec_ctx.h" + #ifdef __cplusplus extern "C" { #endif @@ -39,25 +41,18 @@ void gpr_thd_end_blocking_region(); do { \ gpr_thd_start_blocking_region(); \ } while (0) -#define GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX \ - do { \ - gpr_thd_end_blocking_region(); \ - } while (0) -#define GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(ec) \ - do { \ - gpr_thd_end_blocking_region(); \ - grpc_exec_ctx_invalidate_now((ec)); \ +#define GRPC_SCHEDULING_END_BLOCKING_REGION \ + do { \ + gpr_thd_end_blocking_region(); \ + grpc_core::ExecCtx::Get()->InvalidateNow(); \ } while (0) #else #define GRPC_SCHEDULING_START_BLOCKING_REGION \ do { \ } while (0) -#define GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX \ - do { \ - } while (0) -#define GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(ec) \ - do { \ - grpc_exec_ctx_invalidate_now((ec)); \ +#define GRPC_SCHEDULING_END_BLOCKING_REGION \ + do { \ + grpc_core::ExecCtx::Get()->InvalidateNow(); \ } while (0) #endif |