Run-Time Library Routines
OMP SET LOCK: This subroutine forces the executing thread to wait until the specified lock is available. A thread is granted ownership of a lock when it becomes available.
Format
|
void omp set lock(omp lock t *lock)
void omp set nest lock(omp nest nest lock t *lock) |
- It is illegal to call this routine with a lock variable that is not initialized.
OMP UNSET LOCK: This subroutine releases the lock from the executing subroutine
Format |
void omp unset lock(omp lock t *lock)
void omp unset nest lock(omp nest nest lock t *lock) |
- It is illegal to call this routine with a lock variable that is not initialized.
OMP TEST LOCK: This subroutine attempts to set a lock, but does not block if the lock is unavailable.
Format |
void omp test lock(omp lock t *lock)
void omp test nest lock(omp nest nest lock t *lock) |
- It is illegal to call this routine with a lock variable that is not initialized.
- For C/C++ non zero is returned if the lock was set successfully,otherwise zero is returned
|