mutex_destroy(3synch) mutex_destroy(3synch)
NAME
mutex_destroy - destroy a mutex
SYNOPSIS
cc [options] -Kthread file
#include <synch.h>
int mutex_destroy(mutex_t *mutex);
Parameters
mutex pointer to mutex to be destroyed
DESCRIPTION
mutex_destroy destroys the mutex pointed to by mutex. This
includes invalidating the mutex and freeing any associated
implementation-allocated dynamic resources.
Any user-allocated dynamic storage is unaffected by
mutex_destroy and must be explicitly released by the program.
Return Values
mutex_destroy returns zero for success and an error number for
failure, as described below.
Errors
If any of the following conditions is detected, mutex_destroy
returns the corresponding value:
EBUSY mutex is locked or another thread is waiting to
acquire mutex.
EINVAL Invalid argument specified.
EINVAL The mutex denoted by mutex was already destroyed.
REFERENCES
mutex(3synch), mutex_init(3synch), mutex_lock(3synch),
mutex_trylock(3synch), mutex_unlock(3synch), synch(3synch)
Copyright 1994 Novell, Inc. Page 1