DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

_spin_destroy(SYNCH)


_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(SYNCH), _spin(SYNCH), _spin_init(SYNCH), _spin_lock(SYNCH), _spin_trylock(SYNCH), _spin_unlock(SYNCH)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005