DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

latch_close(S-osr5)


latch_close -- close a latch

Syntax

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

int latch_close(latch_t *latch);

Description

The latch_close function is used to indicate that the calling process has finished using the named latch indicated by latch. If the latch has not been removed with a successful call to latch_unlink(S-osr5), then latch_close has no effect on the state of the latch. If latch_unlink has been successfully invoked for name after the most recent call to latch_open(S-osr5) with O_CREAT for this latch, then when all processes that have opened the latch close it, the latch is no longer accessible.

Return values

Upon successful completion, the function returns zero. Otherwise it returns -1 and errno is set to indicate the error.

Diagnostics

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

See also

latch_getvalue(S-osr5), latch_open(S-osr5), latch_post(S-osr5), latch_trywait(S-osr5), latch_unlink(S-osr5), latch_wait(S-osr5), sem_close(S-osr5)

Standards conformance

latch_close 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