Reference: IVEShmTryAcquireMutex

Overview

Locks a mutual exclusion lock if it is currently unlocked.

Prototype (C)

#include "ive_standards.h"
#include "ive_shm.h"
int IVEShmTryAcquireMutex(IVEShmMutex* p_mutex);

Prototype (Fortran)

There is no Fortran interface.

Parameters

p_mutex
p_mutex points to the mutex to be locked.

Return value

If *p_mutex could be locked, the function returns true and the caller should release the lock with IVEShmReleaseMutex when it no longer needs to hold the mutex. If *p_mutex could not be locked because it was already locked, the function returns false.

Side effects

Inclusion of ive_standards.h sets certain feature-set macros. It is safest to include it before any other headers to avoid inconsistent definitions.

Cross references

IVEShmInitMutex, IVEShmDestroyMutex, IVEShmAcquireMutex, IVEShmReleaseMutex, and IVEShmMutex


| categories | alphabetical |


modified July 1, 2001

Eric Branlund (eric@msg.ucsf.edu)