upc_lock
- Date:
03-28-2013
NAME
upc_lock - Locks a shared variable
SYNOPSIS
#include <upc.h>
void upc_lock(upc_lock_t *ptr);
IMPLEMENTATION
Cray Linux Environment (CLE)
DESCRIPTION
The upc_lock function locks a shared variable, of type upc_lock_t, pointed to by the pointer given as argument. If the lock is not used by another thread, then the thread making the call gets the lock and the function returns. Otherwise, the function keeps trying to get access to the lock. A null strict reference is implied after a call to upc_lock. If the calling thread is already holding the lock referenced by ptr (that is, it has previously locked it using upc_lock or upc_lock_attempt but not unlocked it), the result is undefined.
SEE ALSO
upc_all_lock_alloc(3c), upc_global_lock_alloc(3c), upc_lock_attempt(3c), upc_lock_free(3c), upc_lock_t(3c), upc_unlock(3c)