/sys$common/syshlp/HELPLIB.HLB  —  POSIX Threads, TIS routines, tis_mutex_destroy
    Destroys the specified mutex object.

1  –  C Binding

    #include <tis.h>

    int
    tis_mutex_destroy (
                pthread_mutex_t   *mutex);

2  –  Arguments

 mutex

    Address of the mutex object (passed by reference) to be
    destroyed.

3  –  Description

    This routine destroys a mutex object by uninitializing it, and
    should be called when a mutex object is no longer referenced.
    After this routine is called, the Threads Library can reclaim
    internal storage used by the mutex object.

    It is safe to destroy an initialized mutex object that is
    unlocked. However, it is illegal to destroy a locked mutex
    object.

    The results of this routine are unpredictable if the mutex object
    specified in the mutex argument either does not currently exist
    or is not initialized.

4  –  Return Values

    If an error condition occurs, this routine returns an integer
    value indicating the type of error. Possible return values are as
    follows:

    Return      Description

    0           Successful completion.
    [EBUSY]     An attempt was made to destroy the object referenced
                by mutex while it is locked or referenced.
    [EINVAL]    The value specified by mutex is not a valid mutex.
    [EPERM]     The caller does not have privileges to perform the
                operation.

5  –  Associated Routines

       tis_mutex_init()
       tis_mutex_lock()
       tis_mutex_trylock()
       tis_mutex_unlock()
Close Help