Reference: IVEThreadInitMutex

Overview

Initializes a mutual exclusion lock.

Prototype (C)

#include "ive_standards.h"
#include "ive_thread.h"
void IVEThreadInitMutex(IVEThreadMutex* p_mutex, int* p_status);

Prototype (Fortran)

There is no Fortran interface.

Parameters

p_mutex
p_mutex points to the mutex to be initialized. When the mutex is no longer needed, any resources associated with it may be freed by calling IVEThreadDestroyMutex.
p_status
If the call fails, *p_status will be set to one of the values below; otherwise its value is not modified.
IVE_ERR_NO_MEM
There was insufficient memory available to complete the operation.
IVE_ERR_NO_RESOURCES
There was insufficient system resources available (other than memory) to complete the operation.
IVE_ERR_NO_PERMISSION
The caller does not have sufficient privileges to perform the operation.
IVE_ERR_IN_USE
p_mutex points to an already initialized mutex that has not yet been destroyed.
IVE_ERR_INTERNAL
An error internal to the library was detected. This is most likely because of a bug in the library.
IVE_ERR_UNRECOGNIZED
The operating system or system library returned an error code that was not expected.

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

IVEThreadDestroyMutex, IVEThreadAcquireMutex, IVEThreadTryAcquireMutex, IVEThreadReleaseMutex, and IVEThreadMutex


| categories | alphabetical |


modified May 7, 2002

Eric Branlund (eric@msg.ucsf.edu)