mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-07 23:22:11 +01:00
16 lines
215 B
C
16 lines
215 B
C
/*
|
|
* @@name: threadprivate.1c
|
|
* @@type: C
|
|
* @@compilable: yes
|
|
* @@linkable: no
|
|
* @@expect: success
|
|
*/
|
|
int counter = 0;
|
|
#pragma omp threadprivate(counter)
|
|
|
|
int increment_counter()
|
|
{
|
|
counter++;
|
|
return(counter);
|
|
}
|