Newsgroups: comp.sys.transputer
From: jan@neuroinformatik.ruhr-uni-bochum.de (Jan Vorbrueggen)
Subject: Re: Mixing OCCAM and C?
Organization: Institut fuer Neuroinformatik, Ruhr-Universitaet Bochum, Germany
Date: 24 Sep 94 07:39:19 GMT
Message-ID: <JAN.94Sep24083919@hermes.neuroinformatik.ruhr-uni-bochum.de>

Your problem ist that the occam notation "chan ? item1; item2" will do two
inputs, one each for item1 and item2. ChanOut, of course, is doing only one
output! Thus, your programme is deadlocked on the second occam input...

If you think about what's going on behind the scenes, you'll come to the
conclusion that this has to be implemented this way, as an input/output pair
is really only a glorified memory-to-memory copy of contiguous parts of data.
The compiler can't assume that it can move item1 and item2 in one go.

Paradoxically, it would have worked - by implementation accident - if the two
processes had been on different processors and had tried to communicate
directly via a hard link!

	Jan

