summaryrefslogtreecommitdiff
path: root/tests/barrier1.c
blob: bc0eb52f28950a439077fde39d347a6e4dbd03c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* 
 * barrier1.c
 *
 * Create a barrier object and then destroy it.
 *
 */

#include "test.h"

pthread_barrier_t barrier = NULL;

int
main()
{
  assert(barrier == NULL);

  assert(pthread_barrier_init(&barrier, NULL, 1) == 0);

  assert(barrier != NULL);

  assert(pthread_barrier_destroy(&barrier) == 0);

  assert(barrier == NULL);

  return 0;
}