39 lines · c
1//===-- condition_variable_linux.h ------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef SCUDO_CONDITION_VARIABLE_LINUX_H_10#define SCUDO_CONDITION_VARIABLE_LINUX_H_11 12#include "platform.h"13 14#if SCUDO_LINUX15 16#include "atomic_helpers.h"17#include "condition_variable_base.h"18#include "thread_annotations.h"19 20namespace scudo {21 22class ConditionVariableLinux23 : public ConditionVariableBase<ConditionVariableLinux> {24public:25 void notifyAllImpl(HybridMutex &M) REQUIRES(M);26 27 void waitImpl(HybridMutex &M) REQUIRES(M);28 29private:30 u32 LastNotifyAll = 0;31 atomic_u32 Counter = {};32};33 34} // namespace scudo35 36#endif // SCUDO_LINUX37 38#endif // SCUDO_CONDITION_VARIABLE_LINUX_H_39