omp_test_lock, omp_test_nest_lock

Purpose

Attempts to set a lock but does not block execution of the thread.

Prototype

int omp_test_lock (omp_lock_t * lock);

int omp_test_nest_lock (omp_nest_lock_t * lock);

Parameter

lock
Must be a variable of type omp_lock_t that is initialized with omp_init_lock or omp_init_nest_lock.