DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

latch_unlink(S-osr5)


latch_unlink -- remove latch from the system

Syntax

cc . . . -lsuds
#include <latch.h>

int latch_unlink(const char *name);

Description

The latch_unlink function is used to remove the latch named by name. If name is currently referenced by other processes, then latch_unlink has no effect on the state of the latch. If one or more processes have the latch open when latch_unlink is called, destruction of the latch is postponed until all references to it have been destroyed by calls to latch_close(S-osr5), _exit(S-osr5), or exec(S-osr5). Calls to latch_open(S-osr5), to re-create or re-connect to the latch, refer to a new latch after latch_unlink is called. latch_unlink does not block until all references have been destroyed; it returns immediately.

Return values

Upon successful completion, the function returns zero. Otherwise the latch is not changed by this function call and the function returns -1 with errno set to indicate the error.

Diagnostics

Errors returned are as for sem_unlink(S-osr5).

See also

latch_close(S-osr5), latch_getvalue(S-osr5), latch_open(S-osr5), latch_post(S-osr5), latch_trywait(S-osr5), latch_wait(S-osr5), sem_unlink(S-osr5)

Standards conformance

latch_unlink is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005