[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / libc / src / threads / linux / cnd_wait.cpp
blob5c0aed7be76da038a1d9e10f86b90ab9229678d6
1 //===-- Linux implementation of the cnd_wait function ---------------------===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "CndVar.h"
11 #include "src/__support/common.h"
12 #include "src/__support/threads/mutex.h"
13 #include "src/threads/cnd_wait.h"
15 namespace __llvm_libc {
17 LLVM_LIBC_FUNCTION(int, cnd_wait, (cnd_t * cond, mtx_t *mtx)) {
18 CndVar *cndvar = reinterpret_cast<CndVar *>(cond);
19 Mutex *mutex = reinterpret_cast<Mutex *>(mtx);
20 return cndvar->wait(mutex);
23 } // namespace __llvm_libc