HP aC++/HP C A.06.20 Programmer's Guide

omp_get_nested
#include <omp.h>
int omp_get_nested(void);
The omp_get_nested function returns non-zero if nested parallelism is enabled and
0 if it is disabled.
Lock Functions
The functions described in this section manipulate locks used for synchronization.
For the following functions, the lock variable must have type omp_lock_t. For nestable
lock functions, the lock variable must have type omp_nest_lock_t.
This variable must only be accessed through these functions. All lock functions require
an argument that has a pointer to omp_lock_t type for lock functions and
omp_nest_lock_t for nestable lock functions.
omp_init_lock and omp_init_nest_lock
omp_destroy_lock and omp_destroy_nest_lock
omp_set_lock and omp_set_nest_lock
omp_unset_lock and omp_unset_nest_lock
omp_test_lock and omp_test_nest_lock
omp_init_lock and omp_init_nest_lock
#include <omp.h>
void omp_init_lock(omp_lock_t *lock);
void omp_init_nest_lock(omp_nest_lock_t *lock);
These functions provide the only means of initializing a lock. Each function initializes
the lock associated with the parameter lock for use in subsequent calls. The initial state
is unlocked (that is, no thread owns the lock). For a nestable lock, the initial nesting
count is zero
omp_destroy_lock and omp_destroy_nest_lock
#include <omp.h>
void omp_destroy_lock(omp_lock_t *lock);
void omp_destroy_nest_lock(omp_nest_lock_t *lock);
These functions ensure that the pointed to lock variable lock is uninitialized. The
argument to these functions must point to an initialized lock variable that is locked.
omp_set_lock and omp_set_nest_lock
#include <omp.h>
void omp_set_lock(omp_lock_t *lock);
224 Exception Handling