mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-10 08:22:11 +01:00
16 lines
225 B
C
16 lines
225 B
C
/*
|
|
* @@name: threadprivate.1
|
|
* @@type: C
|
|
* @@operation: compile
|
|
* @@expect: success
|
|
* @@version: pre_omp_3.0
|
|
*/
|
|
int counter = 0;
|
|
#pragma omp threadprivate(counter)
|
|
|
|
int increment_counter()
|
|
{
|
|
counter++;
|
|
return(counter);
|
|
}
|