chromium/third_party/grpc/src/src/core/lib/iomgr/executor.cc

//
//
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

#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)] =;

}  // namespace

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) {}

// Executor::InitAll() and Executor::ShutdownAll() functions are called in the
// the grpc_init() and grpc_shutdown() code paths which are protected by a
// global mutex. So it is okay to assume that these functions are thread-safe
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) {}

}  // namespace grpc_core