Converting openmp programs to Habanero-C

Creating a task

#pragma omp task  => async 

The block of code enclosed by an omp task is now enclosed in an async block

Passing data to a task

OpenMP provide the following clause to define how a task should access variables

Equivalent in HC:

Waiting for tasks

#pragma omp taskwait

Need to create a finish block that encloses each asyncs (omp tasks) the application needs to wait for.

Atomic and Critical sections

#pragma omp critical: enclosed block executed by only one thread at a time
HC doesn't provide the "isolated" construct as HJ does. Currently, you'll need to use any lock implementation available in C.
One solution is to use pthread_mutex_lock / pthread_mutex_unlock

#pragma omp atomic: atomic operation translated to hardware specific operation.
You should use one of the primitive provided by HC. Have a look at hc_sysdep.h in the HC runtime src folder. It provides implementations such as atomic CAS, atomic increment, etc... for various platforms.