Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions libc/src/__support/threads/linux/barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,20 @@ class Barrier {
int wait();
};

static_assert(
sizeof(Barrier) == sizeof(pthread_barrier_t),
"The public pthread_barrier_t type cannot accommodate the internal "
"barrier type.");
static_assert(sizeof(Barrier) <= sizeof(pthread_barrier_t),
"The public pthread_barrier_t type cannot accommodate the "
"internal barrier type.");

static_assert(alignof(Barrier) == alignof(pthread_barrier_t),
static_assert(alignof(Barrier) <= alignof(pthread_barrier_t),
"The public pthread_barrier_t type has a different alignment "
"than the internal barrier type.");

static_assert(sizeof(CndVar) <= 24,
"CndVar size exceeds the size in __barrier_type.h");

static_assert(sizeof(Mutex) <= 24,
"Mutex size exceeds the size in __barrier_type.h");

} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC___SUPPORT_SRC_THREADS_LINUX_BARRIER_H
Loading