Debian Codegraph @

gcc/testsuite/c-c++-common/tm/omp.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -fopenmp" } */
3 /* { dg-require-effective-target pthread } */
4
5 __attribute__ ((transaction_pure))
6 unsigned long rdtsc();
7
8 typedef struct ENTER_EXIT_TIMES
9 {
10 unsigned long enter;
11 } times_t;
12
13 void ParClassify()
14 {
15 void * Parent;
16 #pragma omp parallel private(Parent)
17 {
18 times_t inside;
19 __transaction_atomic {
20 inside.enter = rdtsc();
21 }
22 }
23 }