9fans archive / 1997 / 09 / 63 /    prev next

From: forsyth@cal... forsyth@cal...
Subject: [9fans] XaoS - first useable version
Date: Wed, 10 Sep 1997 18:11:59 BST

when describing the process synchronisation primitives,
i forgot to mention rendezvous(2), which is the system
call to synchronise two processes.  given rendezvous,
<lock.h>, and rfork, you should be able to write the little
you need fairly easily.  processes can rendezvous to
collect points without busy waiting on the spin lock.
note that you should
	rfork(RFNAMEG)
in main(), to ensure that you've got a separate space
for the rendezvous values.  (why RFNAMEG? because that rendezvous
space is tied to the name space in Plan 9; in Brazil it
becomes a separate resource controlled by a distinct flag to rfork.)