OpenMP-Examples/sources/Example_threadprivate.2c.c
2015-01-13 11:38:24 -08:00

15 lines
227 B
C

/*
* @@name: threadprivate.2c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
*/
int increment_counter_2()
{
static int counter = 0;
#pragma omp threadprivate(counter)
counter++;
return(counter);
}