Path: blob/main/contrib/llvm-project/compiler-rt/lib/scudo/standalone/condition_variable_linux.h
35292 views
//===-- condition_variable_linux.h ------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef SCUDO_CONDITION_VARIABLE_LINUX_H_9#define SCUDO_CONDITION_VARIABLE_LINUX_H_1011#include "platform.h"1213#if SCUDO_LINUX1415#include "atomic_helpers.h"16#include "condition_variable_base.h"17#include "thread_annotations.h"1819namespace scudo {2021class ConditionVariableLinux22: public ConditionVariableBase<ConditionVariableLinux> {23public:24void notifyAllImpl(HybridMutex &M) REQUIRES(M);2526void waitImpl(HybridMutex &M) REQUIRES(M);2728private:29u32 LastNotifyAll = 0;30atomic_u32 Counter = {};31};3233} // namespace scudo3435#endif // SCUDO_LINUX3637#endif // SCUDO_CONDITION_VARIABLE_LINUX_H_383940