DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

latch_close(S)


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), 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) 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).

See also

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

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.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003