rmutex_destroy(3synch)


rmutex_destroy -- destroy a recursive mutex

Synopsis

   cc [options] -Kthread file
   

#include <synch.h>

int rmutex_destroy(rmutex_t *rmutex);

Description

rmutex_destroy destroys the recursive mutual exclusion lock (rmutex) pointed to by rmutex. This includes invalidating the rmutex and freeing any associated implementation-allocated dynamic resources.

Parameters


rmutex
pointer to recursive mutex to be destroyed

Any user-allocated dynamic storage is unaffected by rmutex_destroy and must be explicitly released by the program.

Return values

rmutex_destroy returns zero for success and an error number for failure.

Errors

If any of the following conditions is detected, rmutex_destroy returns the corresponding value:

EBUSY
rmutex is locked by another thread or another thread is waiting to acquire rmutex

EINVAL
invalid argument specified

EINVAL
the rmutex pointed to by rmutex was already destroyed

References

Intro(3synch), mutex(3synch), rmutex(3synch), rmutex_init(3synch), rmutex_lock(3synch), rmutex_trylock(3synch), rmutex_unlock(3synch)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004