58 lines · 1.3 KB · Text
RawDownload
.TH RENDEZVOUS 2.SH NAMErendezvous \- user level process synchronization.SH SYNOPSIS.B #include <u.h>.br.B #include <libc.h>.PP.Bvoid* rendezvous(void* tag, void* value).SH DESCRIPTIONThe rendezvous system call allows two processes to synchronize andexchange a value.In conjunction with the shared memory system calls(see.IR segattach (2)and.IR fork (2)),it enables parallel programs to control their scheduling..PPTwo processes wishing to synchronize call.I rendezvouswith a common.IR tag ,typically an address inmemory they share.One process will arrive at the rendezvous first;it suspends execution until a second arrives.When a second process meets the rendezvousthe.I valuearguments are exchanged between the processes and returnedas the result of the respective.I rendezvoussystem calls.Both processes are awakened whenthe rendezvous succeeds..PPThe set of tag values which two processes may use to rendezvous\(emtheir tag space\(emisinherited when a process forks, unless.B RFRENDis set in the argument to.BR rfork ;see.IR fork (2)..PPIf a rendezvous is interrupted the return value is.BR ~0 ,so that value should not be used in normal communication..SH SOURCE.B /sys/src/libc/9syscall.SH SEE ALSO.IR fork (2),.IR lock (2),.IR segattach (2).SH DIAGNOSTICSSets.IR errstr .