OpenMP Runtime
Functions
tomp_lock.c File Reference

Implements the OMP locking APIs. More...

#include "tomp_parallel.h"
#include "omp.h"
Include dependency graph for tomp_lock.c:

Functions

void omp_init_lock (omp_lock_t *lock)
 Allocate the lock variable and initialize it to an unlocked state.
void omp_destroy_lock (omp_lock_t *lock)
 Free storage associated with the lock variable.
void omp_set_lock (omp_lock_t *lock)
 Set the lock.
int omp_test_lock (omp_lock_t *lock)
 Attempt to set the lock.
void omp_unset_lock (omp_lock_t *lock)
 Unset the lock.
void omp_init_nest_lock (omp_nest_lock_t *lock)
 Initialize the nested lock and set nesting count to 0.
void omp_destroy_nest_lock (omp_nest_lock_t *lock)
 Free storage associated with the lock variable.
void omp_set_nest_lock (omp_nest_lock_t *lock)
 Set the nested lock.
int omp_test_nest_lock (omp_nest_lock_t *lock)
 Attempt to set the nested lock.
void omp_unset_nest_lock (omp_nest_lock_t *lock)
 Decrement the nesting count and unset if resulting count is 0.

Detailed Description

Implements the OMP locking APIs.


Function Documentation

void omp_destroy_lock ( omp_lock_t *  lock)

Free storage associated with the lock variable.

Parameters:
lockptr to variable of type omp_lock_t

Here is the caller graph for this function:

void omp_destroy_nest_lock ( omp_nest_lock_t *  lock)

Free storage associated with the lock variable.

Parameters:
lockptr to variable of type omp_nest_lock_t

Here is the call graph for this function:

void omp_init_lock ( omp_lock_t *  lock)

Allocate the lock variable and initialize it to an unlocked state.

Also, no task owns the lock.

Parameters:
lockptr to variable of type omp_lock_t

Here is the caller graph for this function:

void omp_init_nest_lock ( omp_nest_lock_t *  lock)

Initialize the nested lock and set nesting count to 0.

Parameters:
lockptr to variable of type omp_nest_lock_t
See also:
omp_init_lock

Here is the call graph for this function:

void omp_set_lock ( omp_lock_t *  lock)

Set the lock.

Parameters:
lockptr to variable of type omp_lock_t

Here is the call graph for this function:

Here is the caller graph for this function:

void omp_set_nest_lock ( omp_nest_lock_t *  lock)

Set the nested lock.

Parameters:
lockptr to variable of type omp_nest_lock_t

Here is the call graph for this function:

int omp_test_lock ( omp_lock_t *  lock)

Attempt to set the lock.

Parameters:
lockptr to variable of type omp_lock_t
Returns:
1 if the lock is successfully set, 0 otherwise

Here is the call graph for this function:

Here is the caller graph for this function:

int omp_test_nest_lock ( omp_nest_lock_t *  lock)

Attempt to set the nested lock.

Parameters:
lockptr to variable of type omp_nest_lock_t
Returns:
The new nesting count if the lock is successfully set, 0 otherwise

Here is the call graph for this function:

void omp_unset_lock ( omp_lock_t *  lock)

Unset the lock.

Parameters:
lockptr to variable of type omp_lock_t

Here is the call graph for this function:

Here is the caller graph for this function:

void omp_unset_nest_lock ( omp_nest_lock_t *  lock)

Decrement the nesting count and unset if resulting count is 0.

Parameters:
lockptr to variable of type omp_nest_lock_t

Here is the call graph for this function:

 All Classes Files Functions Variables Typedefs Enumerations Defines