llvm/clang-tools-extra/clangd/support/Threading.cpp

//===--- Threading.cpp - Abstractions for multithreading ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "support/Threading.h"
#include "support/Trace.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/thread.h"
#include <atomic>
#include <optional>
#include <thread>
#ifdef __USE_POSIX
#include <pthread.h>
#elif defined(__APPLE__)
#include <sys/resource.h>
#elif defined(_WIN32)
#include <windows.h>
#endif

namespace clang {
namespace clangd {

void Notification::notify() {}

bool Notification::wait(Deadline D) const {}

Semaphore::Semaphore(std::size_t MaxLocks) :{}

bool Semaphore::try_lock() {}

void Semaphore::lock() {}

void Semaphore::unlock() {}

AsyncTaskRunner::~AsyncTaskRunner() {}

bool AsyncTaskRunner::wait(Deadline D) const {}

void AsyncTaskRunner::runAsync(const llvm::Twine &Name,
                               llvm::unique_function<void()> Action) {}

Deadline timeoutSeconds(std::optional<double> Seconds) {}

void wait(std::unique_lock<std::mutex> &Lock, std::condition_variable &CV,
          Deadline D) {}

bool PeriodicThrottler::operator()() {}

} // namespace clangd
} // namespace clang