Newsgroups: comp.sys.transputer
From: ccumani@eso.org (Claudio Cumani)
Subject: Channel retyping
Keywords: channel, anarchic protocol
Organization: ESO - European Southern Observatory, Garching by Munich
Date: Tue, 15 Nov 1994 08:53:59 GMT
Message-ID: <1994Nov15.085359.6918@eso.org>




I have one process (S) which sends messages to another process (R)
through a SP protocol channel ( INT16 :: []BYTE ).
In particular situations, the sending process S needs to retype
the channel with an anarchic protocol, while the receiving process
R is always "seeing" the channel with the SP protocol.
To do this, S first sends an INT16 with the length of the following
stream, then sends a sequence of INT16s.
While all this is working when the two processes are on different
transputers, this is not true if they are on the same processor.
In this case the process R reads every odd INT16 as a message length,
and every INT16 as the following message. 
I.e.:
if S sends
           length = 6, then three INT16s: 1, 2, 3
R reads
           length = 6, message = 1
        and then
           length = 2, message = 3

1) Why ?
2) Is it possible to avoid this ? How ?

--

--------------------------------------------------------------------
Claudio Cumani                       |
ESO - European Southern Observatory  |
Karl-Schwarzschild str. 2            |
D-85748 Garching bei Muenchen        |       if u cn rd ths
BUNDESREPUBLIK DEUTSCHLAND           |     u cn bcm a c prgmr!
                                     |
Voice : +49-89-32006-446             |
Fax   : +49-89-3202362               |
E-Mail: ccumani@eso.org              |
--------------------------------------------------------------------

