[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSP library for VxWorks/Posix

I'm forwarding this from Larry ... he has a tmp. problem in posting direct.


Date: Wed, 01 Sep 1999 14:30:07 -0700
To: Oyvind.Teig@xxxxxxxxxxxx, occam-com@xxxxxxxxx
From: Lawrence Dickson <ldickson@xxxxxxxxxx>
Subject: Re: CSP library for VxWorks/Posix
Cc: ldickson@xxxxxxxxxx, tdickson@xxxxxxxxxx

   I did a little butting of heads with VxWorks and my conclusion
was (a) it's basically DOS, and (b) it's not quite robust.
Actually these are pluses (if true) from your side. (a) may mean
you don't HAVE to deal with layers of buffering, indirection etc
which will make your task easier (I have experience with both
sides of this!!!). (b) may go away if you force CSP restraints on
the code - turning a sow's ear into a silk purse.

>Date: Tue, 31 Aug 1999 08:48:39 +0200
>From: Oyvind Teig <Oyvind.Teig@xxxxxxxxxxxx>
>To: occam-com@xxxxxxxxx
>Cc: Age.Stien@xxxxxxxxxxxx
>Subject: CSP library for VxWorks/Posix
>On the application we're working on now a TMS320C32 will (again)
>run occam code through SPoC. It's a PC/104 slave board being
>controlled by a 386EX PC/104 master board running VxWorks and
>it will do TCP/IP to the external world.
>I'd like the VxWorks application to be programmed using a CSP
>interface. VxWorks has Posix semaphores, Posix named semaphores
>and Posix message queues (in adition to "private" variants).
>VxWorks also has pipes that has this great quality that they can
>be used with a select. The select has timeout! Pipes can be made

This is just like Linux and I've been writing occam-style Linux
multiprogramming code for several months with complete success.
Several of my program modules center around using pipe-selects
(with timeouts) as ALTs.

>  Does anybody know of a transputer-C-toolset-type API that
>  could be ported to this platform, or would you suggest that
>  we just use pipe-selects which do look rather nice.

I'd suggest the latter since native tools are always nicely
supported - IF an exhaustive examination of the pipe-select
reveals it is logically consistent with the CSP primitive.

There is also no reason to restrict the selects to pipes.
Interrupt-driven hardware IO like the keyboard should also work.

There is one annoyance (in Linux): when the process on the other
end of the named pipe terminates and reopens, the "ALTing channel"
freaks out instead of just ignoring it like a good occam channel
would. I get around this with a buffer process on each named pipe
that blocks to await reopen on the outside and never closes its pipe
on the inside. If this is, as I expect, a Posix standard, you will
have to deal with it too.

Larry Dickson

>I have tried comp.os.vxworks. One reply from Ram Meenakshisundaram
>with the source code of a library that Dipl.-Ing. Michael Kabot
>wrote. But is has no ALT functions.
>I have tried uchan at
>but the author says it's a hack, so I don't dear.
>|        Oyvind Teig |          oyvind.teig@xxxxxxxxxxxx |    |    |
>|  Navia Maritime AS |          oyvind.teig@xxxxxxxxxxxx |    |    |
>| division Autronica |                                   |Tel:|Fax:|
>|               7005 |               http://www.navia.no | +47| +47|
>|          Trondheim |           http://www.autronica.no |7358|7391|
>|             Norway | http://www.autronica-maritime.com |1268|9320|