pthread_barrier_init.c\thread\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/thread/pthread_barrier_init.c
blob: 4c3cb28d44c36b04fe6f136af47952fb4840e311 (plain) (blame)
1
2
3
4
5
6
7
8
#include "pthread_impl.h"
int pthread_barrier_init(pthread_barrier_t *restrict b, const pthread_barrierattr_t *restrict a, unsigned count)
{
	if (count-1 > INT_MAX-1) return EINVAL;
	*b = (pthread_barrier_t){ ._b_limit = count-1 | (a?a->__attr:0) };
	return 0;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月10日 17:32:28 +0000

AltStyle によって変換されたページ (->オリジナル) /