pthread: Use 1 for PTHREAD_BARRIER_SERIAL_THREAD.

pthread_barrier_wait can return errors, which on Haiku are negative
and so -1 is an error condition, it should not be reused for a magic
constant.

This breaks ABI. However, until the recent fixes, barriers were so broken
that I doubt any application was using them seriously (Mesa, for instance,
has them disabled.)

Change-Id: Ica23921de012a33e9e7aded816bb1347bd157b31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6517
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: X512 <[email protected]>
This commit is contained in:
Augustin Cavalier
2023-06-07 15:12:11 +00:00
committed by waddlesplash
parent 4785ffe77c
commit b24cc7ca75
+2 -1
View File
@@ -44,7 +44,8 @@
#define PTHREAD_ONCE_INIT { -1 }
#define PTHREAD_BARRIER_SERIAL_THREAD -1
#define PTHREAD_BARRIER_SERIAL_THREAD 1
#define PTHREAD_PRIO_NONE 0
#define PTHREAD_PRIO_INHERIT 1
#define PTHREAD_PRIO_PROTECT 2