RENDEZVOUS(3)

NAME
rendezvous - user level process synchronization

SYNOPSIS
#include <u.h>
#include <libc.h>

ulong rendezvous(ulong tag, ulong value)

DESCRIPTION
The rendezvous system call allows two processes to synchronize and exchange a value. In conjunction with the shared memory system calls (see segattach(3) and fork(3)), it enables parallel programs to control their scheduling.

Two processes wishing to synchronize call rendezvous with a common tag, typically an address in memory they share. One process will arrive at the rendezvous first; it suspends execution until a second arrives. When a second process meets the rendezvous the value arguments are exchanged between the processes and returned as the result of the respective rendezvous system calls. Both processes are awakened when the rendezvous succeeds.

The set of tag values which two processes may use to rendezvous—their tag space—is inherited when a process forks, unless RFREND is set in the argument to rfork; see fork(3).

If a rendezvous is interrupted the return value is ~0, so that value should not be used in normal communication.

SOURCE
/usr/local/plan9/src/libc/9syscall

SEE ALSO
segattach(3), fork(3)

DIAGNOSTICS
Sets errstr.