chromium/third_party/perfetto/src/base/thread_task_runner.cc

/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * 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 "perfetto/base/build_config.h"

#include "perfetto/ext/base/thread_task_runner.h"

#include <condition_variable>
#include <functional>
#include <mutex>
#include <thread>

#include "perfetto/base/logging.h"
#include "perfetto/ext/base/thread_utils.h"
#include "perfetto/ext/base/unix_task_runner.h"

#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
#include <sys/prctl.h>
#endif

namespace perfetto {
namespace base {

ThreadTaskRunner::ThreadTaskRunner(ThreadTaskRunner&& other) noexcept
    :{}

ThreadTaskRunner& ThreadTaskRunner::operator=(ThreadTaskRunner&& other) {}

ThreadTaskRunner::~ThreadTaskRunner() {}

ThreadTaskRunner::ThreadTaskRunner(const std::string& name) :{}

void ThreadTaskRunner::RunTaskThread(
    std::function<void(UnixTaskRunner*)> initializer) {}

void ThreadTaskRunner::PostTaskAndWaitForTesting(std::function<void()> fn) {}

uint64_t ThreadTaskRunner::GetThreadCPUTimeNsForTesting() {}

void ThreadTaskRunner::PostTask(std::function<void()> task) {}

void ThreadTaskRunner::PostDelayedTask(std::function<void()> task,
                                       uint32_t delay_ms) {}

void ThreadTaskRunner::AddFileDescriptorWatch(
    PlatformHandle handle,
    std::function<void()> watch_task) {}

void ThreadTaskRunner::RemoveFileDescriptorWatch(PlatformHandle handle) {}

bool ThreadTaskRunner::RunsTasksOnCurrentThread() const {}

}  // namespace base
}  // namespace perfetto