1 /* Trivial test of single. */
3 /* { dg-require-effective-target sync_int_long } */
14 static void f_nocopy (void *dummy)
16 if (GOMP_single_start ())
18 int iam = omp_get_thread_num ();
19 int old = __sync_lock_test_and_set (&test, iam);
24 static void f_copy (void *dummy)
26 int *x = GOMP_single_copy_start ();
29 int iam = omp_get_thread_num ();
30 int old = __sync_lock_test_and_set (&test, iam);
32 GOMP_single_copy_end (&test);
43 GOMP_parallel_start (f_nocopy, NULL, 3);
48 GOMP_parallel_start (f_copy, NULL, 3);