HomeFreeBSD

libthr: check for possible overflow in the pthread_barrier_init() count.

Description

libthr: check for possible overflow in the pthread_barrier_init() count.

Following up on r320900, where the check for negative count values was
removed, add a check to prevent integer overflow. This is to account that
b_count, b_waiters but most importantly the total number of threads in
the system are signed values.

Discussed with: kib
MFC after: 2 weeks

Details

Provenance
pfgAuthored on
Parents
rS321010: MFC r281882(by trasz@):
Branches
Unknown
Tags
Unknown