home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.transputer
- Path: sparky!uunet!mcsun!sun4nl!dutrun!dutrun2!dutncp8!rlogin
- From: rob@pact.nl (Rob Kurver)
- Subject: Re: Discriminated protocols
- Message-ID: <rlogin.724966959@dutncp8>
- Keywords: Occam, ANSI C
- Sender: news@dutrun2.tudelft.nl (UseNet News System)
- Nntp-Posting-Host: dutncp8.tn.tudelft.nl
- Organization: PACT, Delft, The Netherlands
- References: <1992Dec21.132719.23839@hubcap.clemson.edu>
- Date: Mon, 21 Dec 1992 19:42:39 GMT
- Lines: 21
-
- In <1992Dec21.132719.23839@hubcap.clemson.edu> ka@wan.inf.rl.ac.uk( (Khalid Akram \(student-david;until 31/12/92\)) writes:
-
- >how does one implement discriminated protocols using INMOS ANSI C?
-
- In C (ANY transputer C), you can simply use a union and send that with
- a single channel input/output pair (be they function calls or language
- constructs or whatever). Unless one member of the union is very much
- larger than the other, and not sent very often, the overhead of sending
- a larger message is usually compensated by the single input/output.
-
- If you find you're transferring too much data this way, you can explicitly
- input/output the union tag first, followed by the right body for the
- tag.
-
- Rob
-
- --
- PACT Rob Kurver
- Foulkeslaan 87 rob@pact.nl
- 2625 RB Delft ph: +31 15 616864
- The Netherlands fax: +31 15 610032
-