void omp_destroy_lock(omp_lock_t *lock);
void omp_destroy_nest_lock(omp_nest_lock_t *lock);
SummaryThese routines ensure that the OpenMP lock is uninitialized.
Constraints on ArgumentsA program that accesses a lock that is not in the unlocked state through either routine is non-conforming.
EffectThe effect of these routines is to change the state of the lock to uninitialized.
Execution Model EventsThe lock-destroy event occurs in a thread that executes an omp_destroy_lock region before it finishes the region. The nest-lock-destroy_with_hint event occurs in a thread that executes an omp_destroy_nest_lock region before it finishes the region.
Tool CallbacksA thread dispatches a registered ompt_callback_lock_destroy callback with ompt_mutex_lock as the kind argument for each occurrence of a lock-destroy event in that thread. Similarly, a thread dispatches a registered ompt_callback_lock_destroy callback with ompt_mutex_nest_lock as the kind argument for each occurrence of a nest-lock-destroy event in that thread. These callbacks have the type signature ompt_callback_mutex_acquire_t and occur in the task that encounters the routine.