1 /* Trivial test of barrier. */
10 struct timeval stamps
[3][3];
12 static void function(void *dummy
)
14 int iam
= omp_get_thread_num ();
16 gettimeofday (&stamps
[iam
][0], NULL
);
24 gettimeofday (&stamps
[0][1], NULL
);
30 gettimeofday (&stamps
[iam
][2], NULL
);
37 GOMP_parallel_start (function
, NULL
, 3);
41 assert (timercmp (&stamps
[0][0], &stamps
[0][1], <));
42 assert (timercmp (&stamps
[1][0], &stamps
[0][1], <));
43 assert (timercmp (&stamps
[2][0], &stamps
[0][1], <));
45 assert (timercmp (&stamps
[0][1], &stamps
[0][2], <));
46 assert (timercmp (&stamps
[0][1], &stamps
[1][2], <));
47 assert (timercmp (&stamps
[0][1], &stamps
[2][2], <));