The omp_in_parallel function returns
omp_set_dynamic
#include <omp.h>
void omp_set_dynamic(int dynamic_threads);
The omp_set_dynamic function enables or disables dynamic adjustment of the number of threads available for execution of parallel regions. This function has effect only when called from serial portions of the program. If it is called from a portion of the program where the omp_in_parallel function returns
The default for the dynamic adjustment of threads is 0.
omp_get_dynamic
#include <omp.h>
int omp_get_dynamic(void);
The omp_get_dynamic function returns
omp_set_nested
#include <omp.h>
void omp_set_nested(int nested);
The omp_set_nested function enables or disables nested parallelism. If nested evaluates to 0, which is the default, nested parallelism is disabled, and nested parallel regions are serialized and executed by the current thread. If nested evaluates to
omp_get_nested
#include <omp.h>
int omp_get_nested(void);
The omp_get_nested function returns
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.
172 Exception Handling