process-shared barrier support, based on discussion with bdonlan
[musl] / src / thread / pthread_barrier_destroy.c
1 #include "pthread_impl.h"
2
3 void __vm_lock(int), __vm_unlock(void);
4
5 int pthread_barrier_destroy(pthread_barrier_t *b)
6 {
7         if (b->_b_limit < 0) {
8                 __vm_lock(-1);
9                 __vm_unlock();
10         }
11         return 0;
12 }