thr_barrier.c (5e53a4f90f82c4345f277dd87cc9292f26e04a29) thr_barrier.c (b6413b6db8756c1ecae5e575e6516f811966046f)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2003 David Xu <davidxu@freebsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 82 unchanged lines hidden (view full) ---

91 if (pshared)
92 __thr_pshared_destroy(barrier);
93 else
94 free(bar);
95 return (0);
96}
97
98int
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2003 David Xu <davidxu@freebsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 82 unchanged lines hidden (view full) ---

91 if (pshared)
92 __thr_pshared_destroy(barrier);
93 else
94 free(bar);
95 return (0);
96}
97
98int
99_pthread_barrier_init(pthread_barrier_t *barrier,
100 const pthread_barrierattr_t *attr, unsigned count)
99_pthread_barrier_init(pthread_barrier_t * __restrict barrier,
100 const pthread_barrierattr_t * __restrict attr, unsigned count)
101{
102 pthread_barrier_t bar;
103 int pshared;
104
105 if (barrier == NULL || count == 0 || count > INT_MAX)
106 return (EINVAL);
107
108 if (attr == NULL || *attr == NULL ||

--- 66 unchanged lines hidden ---
101{
102 pthread_barrier_t bar;
103 int pshared;
104
105 if (barrier == NULL || count == 0 || count > INT_MAX)
106 return (EINVAL);
107
108 if (attr == NULL || *attr == NULL ||

--- 66 unchanged lines hidden ---