1 /* Trivial test of ordered. */
3 /* { dg-require-effective-target sync_int_long } */
13 static int CHUNK
, NTHR
;
15 static void clean_data (void)
20 static void set_data (long i
)
22 int n
= __sync_fetch_and_add (&next
, 1);
27 #define TMPL_1(sched) \
28 static void f_##sched##_1 (void *dummy) \
31 if (GOMP_loop_ordered_##sched##_start (0, N, 1, CHUNK, &s0, &e0)) \
34 for (i = s0; i < e0; ++i) \
36 GOMP_ordered_start (); \
38 GOMP_ordered_end (); \
41 while (GOMP_loop_ordered_##sched##_next (&s0, &e0)); \
44 static void t_##sched##_1 (void) \
47 GOMP_parallel_start (f_##sched##_1, NULL, NTHR); \
48 f_##sched##_1 (NULL); \
49 GOMP_parallel_end (); \
56 static void test (void)