home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / transput / 1349 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.3 KB  |  35 lines

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