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.