1 /* { dg-options "-O0 -pthread -fprofile-update=atomic" } */
2 /* { dg-require-effective-target profile_update_atomic } */
8 #define ITERATIONS (1000 * 1000)
13 void *copy_memory(char *dst
, char *src
, unsigned size
)
15 for (unsigned i
= 0; i
< ITERATIONS
; i
++)
17 dst
[size
% 10] = src
[size
% 20];
23 copy_memory (buffer
, buffer2
, SIZE
);
26 int main(int argc
, char *argv
[])
28 pthread_t threads
[NUM_THREADS
];
31 for(t
=0;t
<NUM_THREADS
;t
++){
32 rc
= pthread_create(&threads
[t
], NULL
, foo
, 0);
39 for(t
=0;t
<NUM_THREADS
;t
++)
40 pthread_join (threads
[t
], (void**)&retval
);