ovni/test/rt/openmp/simple-task.c
Rodrigo Arias 55318d9da7 Update OpenMP emulation model
Add more tests, subsystem states and documentation.
2024-03-12 11:35:18 +01:00

24 lines
284 B
C

#include "compat.h"
int main(void)
{
int a;
int *p = &a;
#pragma omp parallel
#pragma omp single
{
#pragma omp task depend(out : p[0])
{
sleep_us(1000);
}
for (int i = 0; i < 10000; i++)
{
#pragma omp task depend(in : p[0])
sleep_us(1);
}
}
return 0;
}