_spin_destroy(3synch) _spin_destroy(3synch)
NAME
_spin_destroy - destroy a spin lock
SYNOPSIS
cc [options] -Kthread file
#include <synch.h>
int _spin_destroy(spin_t *lock);
Parameters
lock pointer to spin lock to be destroyed
DESCRIPTION
_spin_destroy destroys the spin lock pointed to by lock. This
includes invalidating lock and freeing any associated
implementation-allocated dynamic resources.
Any user-allocated dynamic storage is unaffected by
_spin_destroy and must be explicitly released by the program.
Return Values
_spin_destroy returns zero for success and an error number for
failure, as described below.
Errors
If one of the following conditions is detected, _spin_destroy
returns the corresponding value:
EBUSY lock is locked by another thread.
EINVAL Invalid argument specified.
REFERENCES
_spin(3synch), _spin_init(3synch), _spin_lock(3synch),
_spin_trylock(3synch), _spin_unlock(3synch), synch(3synch)
Copyright 1994 Novell, Inc. Page 1