diff --git a/libc/src/__support/threads/linux/barrier.h b/libc/src/__support/threads/linux/barrier.h index f0655bfc52a10..a632aa45b2aa2 100644 --- a/libc/src/__support/threads/linux/barrier.h +++ b/libc/src/__support/threads/linux/barrier.h @@ -36,14 +36,19 @@ 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(alignof(Barrier) == alignof(pthread_barrier_t), - "The public pthread_barrier_t type has a different alignment " - "than 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), + "The public pthread_barrier_t type has insufficient alignment " + "for 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