Blob


1 .TH RENDEZVOUS 3
2 .SH NAME
3 rendezvous \- user level process synchronization
4 .SH SYNOPSIS
5 .B #include <u.h>
6 .br
7 .B #include <libc.h>
8 .PP
9 .B
10 ulong rendezvous(ulong tag, ulong value)
11 .SH DESCRIPTION
12 The rendezvous system call allows two processes to synchronize and
13 exchange a value.
14 In conjunction with the shared memory system calls
15 (see
16 .IR segattach (3)
17 and
18 .IR fork (3)),
19 it enables parallel programs to control their scheduling.
20 .PP
21 Two processes wishing to synchronize call
22 .I rendezvous
23 with a common
24 .IR tag ,
25 typically an address in
26 memory they share.
27 One process will arrive at the rendezvous first;
28 it suspends execution until a second arrives.
29 When a second process meets the rendezvous
30 the
31 .I value
32 arguments are exchanged between the processes and returned
33 as the result of the respective
34 .I rendezvous
35 system calls.
36 Both processes are awakened when
37 the rendezvous succeeds.
38 .PP
39 The set of tag values which two processes may use to rendezvous\(emtheir tag space\(emis
40 inherited when a process forks, unless
41 .B RFREND
42 is set in the argument to
43 .BR rfork ;
44 see
45 .IR fork (3).
46 .PP
47 If a rendezvous is interrupted the return value is
48 .BR ~0 ,
49 so that value should not be used in normal communication.
50 .SH SOURCE
51 .B /sys/src/libc/9syscall
52 .SH SEE ALSO
53 .IR segattach (3),
54 .IR fork (3)
55 .SH DIAGNOSTICS
56 Sets
57 .IR errstr .