_spin_destroy(3synch)


_spin_destroy -- destroy a spin lock

Synopsis

   cc [options] -Kthread file
   

#include <synch.h>

int _spin_destroy(spin_t *lock);

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.

Parameters


lock
pointer to spin lock to be destroyed

Return values

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

Errors

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

EBUSY
lock is locked by another thread.

EINVAL
invalid argument specified

References

Intro(3synch), _spin(3synch), _spin_init(3synch), _spin_lock(3synch), _spin_trylock(3synch), _spin_unlock(3synch)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004