Newsgroups: comp.sys.transputer
From: bayko@borealis.cs.uregina.ca (John  Bayko)
Subject: Printing problem under C
Summary: Need Help
Keywords: channels, printing, C
Organization: University of Regina
Date: Wed, 06 Apr 1994 22:04:44 GMT
Message-ID: <1994Apr06.220444.2358105@sue.cc.uregina.ca>

    I have a perplexing problem which I hope someone can shed
some light on.
    I'm using a transputer setup from Computer System Architects
(three 4-transputer boards) with the Transputer Toolset C compiler
from Logical Systems. The problem is roughly thus:
 
    Each node is running three processes which look like this:

            other
            procs
              |
              v
            +---+    +---+--->+---+
   LINKS ==>| M |--->| B |    | T |==> LINKS
            +---+    +---+<---+---+

    Process M inputs messages and sends them to process B, which is
a buffer, along with information on which channel was the source.
Process T either sends the message to the boot channel, or if it's
the root node, prints it to the screen. A very simple program, really,
almost a demo program.
    The buffer inputs messages and stores them. When it receives a
request message from process T, then it sends a message when one is
available. Its been tested and works properly.
    The problem is this - if process T prints anything in its main loop,
then process M cannot send a message to process B. However, if process
M prints anything in *its* loop, then the everything proceeds normally.
Which means that using print statements to find out why it's not working
makes it start working.
    In addition, printing from any other process (including process B)
has no effect on this.
    It's driving me crazy, I'm at a complete loss. If I remove the
buffer, it works (but the buffer is necessary for the parts I want
to add to it).
    Any hints, clues, suggestions, or even better - solutions?
    Thanks.

-- 
John Bayko.
bayko@cs.uregina.ca

