From 11:00 PM CST Friday, Apr 11th - 1:30 PM CST Saturday, Apr 12th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

omp_set_lock

omp_set_lock

void omp_set_lock (omp_lock_t *lock);

Purpose

Sets a simple OpenMP lock. This function blocks the calling thread until the lock is available, sets the lock, and then grants ownership of the lock to the calling thread. A simple lock is available only if it is unlocked.

Note Note  The OpenMP Run-Time Library is available only in the LabWindows/CVI Full Development System.

Locks you pass to this function must not be in the unintialized state. Also, locks you pass to this function that are set must not be owned by the calling thread. Calling this function on a lock that is set and owned by the calling thread causes the program to terminate and an error message prints to stderr.

Note Note  Use nestable locks if you want to be able to set a lock more than once from a thread that owns a lock.

Binding thread set: all threads

Parameters

Input
Name Type Description
lock omp_lock_t * A pointer to a variable of type omp_lock_t. After this function returns, the lock variable is in the locked state.

Return Value

None.

Additional Information

Library: OpenMP Run-Time Library

Include file: omp.h

LabWindows/CVI compatibility: LabWindows/CVI 2013 and later

Was this information helpful?

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit