#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/executor.h"
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#define MAX_DEPTH …
#define EXECUTOR_TRACE(format, ...) …
#define EXECUTOR_TRACE0(str) …
namespace grpc_core {
namespace {
thread_local ThreadState* g_this_thread_state;
Executor* executors[static_cast<size_t>(ExecutorType::NUM_EXECUTORS)];
void default_enqueue_short(grpc_closure* closure, grpc_error_handle error) { … }
void default_enqueue_long(grpc_closure* closure, grpc_error_handle error) { … }
void resolver_enqueue_short(grpc_closure* closure, grpc_error_handle error) { … }
void resolver_enqueue_long(grpc_closure* closure, grpc_error_handle error) { … }
EnqueueFunc;
const EnqueueFunc
executor_enqueue_fns_[static_cast<size_t>(ExecutorType::NUM_EXECUTORS)]
[static_cast<size_t>(ExecutorJobType::NUM_JOB_TYPES)] = …;
}
TraceFlag executor_trace(false, "executor");
Executor::Executor(const char* name) : … { … }
void Executor::Init() { … }
size_t Executor::RunClosures(const char* executor_name,
grpc_closure_list list) { … }
bool Executor::IsThreaded() const { … }
void Executor::SetThreading(bool threading) { … }
void Executor::Shutdown() { … }
void Executor::ThreadMain(void* arg) { … }
void Executor::Enqueue(grpc_closure* closure, grpc_error_handle error,
bool is_short) { … }
void Executor::InitAll() { … }
void Executor::Run(grpc_closure* closure, grpc_error_handle error,
ExecutorType executor_type, ExecutorJobType job_type) { … }
void Executor::ShutdownAll() { … }
bool Executor::IsThreaded(ExecutorType executor_type) { … }
bool Executor::IsThreadedDefault() { … }
void Executor::SetThreadingAll(bool enable) { … }
void Executor::SetThreadingDefault(bool enable) { … }
}