[libc-commits] [libc] [libc] Implement barriers for pthreads (PR #148948)
Brooks Moses via libc-commits
libc-commits at lists.llvm.org
Fri Jul 18 14:27:56 PDT 2025
================
@@ -0,0 +1,16 @@
+//===-- Definition of pthread_barrier_t type ------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TYPES_PTHREAD_BARRIER_T_H
+#define LLVM_LIBC_TYPES_PTHREAD_BARRIER_T_H
+
+typedef struct {
----------------
brooksmoses wrote:
I'll let @SchrodingerZhu comment, but I think the only way to get the alignment correct is to add an explicit `alignas` to the `alignof CndVar` and `alignof Mutex` values.
(I'm also not sure of the value of making this less opaque; to me it just seems like a way to let users depend on what should be internal details of the representation.)
https://github.com/llvm/llvm-project/pull/148948
More information about the libc-commits
mailing list