1 /* Trivial test of single. */
12 static void f_nocopy (void *dummy)
14 if (GOMP_single_start ())
16 int iam = omp_get_thread_num ();
17 int old = __sync_lock_test_and_set (&test, iam);
22 static void f_copy (void *dummy)
24 int *x = GOMP_single_copy_start ();
27 int iam = omp_get_thread_num ();
28 int old = __sync_lock_test_and_set (&test, iam);
30 GOMP_single_copy_end (&test);
41 GOMP_parallel_start (f_nocopy, NULL, 3);
46 GOMP_parallel_start (f_copy, NULL, 3);