[compiler-rt] [scudo] Add ConditionVariable in SizeClassAllocator64 (PR #69031)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 10:51:26 PDT 2023
================
@@ -0,0 +1,52 @@
+//===-- condition_variable_linux.cpp ----------------------------*- C++ -*-===//
+//
+// 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 "platform.h"
+
+#if SCUDO_LINUX
+
+#include "condition_variable_linux.h"
+
+#include "atomic_helpers.h"
+
+#include <limits.h>
+#include <linux/futex.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+
+namespace scudo {
+
+void ConditionVariableLinux::notifyAllImpl(UNUSED HybridMutex &M) {
+ const u32 V = atomic_load_relaxed(&Counter) + 1;
----------------
ChiaHungDuan wrote:
Nice suggestion! Thanks
https://github.com/llvm/llvm-project/pull/69031
More information about the llvm-commits
mailing list