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.