Unix/Linux Go Back    

Plan 9 - man page for rendezvous (plan9 section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)


       rendezvous - user level process synchronization

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

       ulong rendezvous(ulong tag, ulong value)

       The  rendezvous	system call allows two processes to synchronize and exchange a value.  In
       conjunction with the shared memory system calls (see segattach(2) and fork(2)), 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  sus-
       pends  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 suc-

       The tag space is common to processes in the same file name space, so rendezvous only works
       between processes in the same file name space.

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


       segattach(2), fork(2)

       Sets errstr.

       The correlation of rendezvous tags and file name space is a historical accident.   If  two
       unrelated  processes happen to be in the same name space and do a rendezvous, trouble will
       result.	The solution is to call rfork(RFNAMEG) (see fork(2)) in programs  that	use  ren-
       dezvous	unless	they  need to share the name space with their parent.  This is especially
       important in Alef programs.

Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 03:51 PM.