Article View: comp.sys.transputer
Article #1185Re: Polling using a hard channel
From: Jonathan Greenfield
Date: Tue, 18 Dec 1990 18:10
Date: Tue, 18 Dec 1990 18:10
34 lines
1974 bytes
1974 bytes
In article <8685.9012070015@pyrltd.pyra.co.uk> chris@alsys.UUCP (Christopher Gray) writes:
>I am developing an application in which it would be desirable to poll
>a hard channel to determine whether or not a remote process is ready
>to communicate over the hard channel.
>
>Unfortunately this cannot be done in occam and there appears to be no
>machine level instruction which allows this.
I am confused about the problem here. I have not had any trouble in
polling "hard" occam channels. Any occam channel (hard or soft) can
be "checked" for the presence of a message using a PRI ALT statement.
i.e., PRI ALT
hardchannel?somevalue
SomeProcess()
TRUE & SKIP
SomeOtherProcess()
The TRUE & SKIP alternative provides an exit after an unsuccessful
communication attempt. The PRI ALT forces the first alternative to be
chosen, if possible. I have never detected any difference in the functioning
of such structures for hard and soft channels.
Of course, because occam only supports input polling, one must finagle in
order to check whether a process is ready to input--like having the input
process first send a request/ready output. This may be more overhead than
you want, but it does work.
Is this what you were interested in?
greeny greeny@top.cis.syr.edu
"What's the difference between an orange?"
Technical Details
Message-ID:
<1990Dec18.113712.3757@rodan.acs.syr.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!wotan.top.cis.syr.edu!greenyReferences:
<8685.9012070015@pyrltd.pyra.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!wotan.top.cis.syr.edu!greeny From: greeny@wotan.top.cis.syr.edu (Jonathan Greenfield) Newsgroups: comp.sys.transputer Subject: Re: Polling using a hard channel Message-ID: <1990Dec18.113712.3757@rodan.acs.syr.edu> Date: 18 Dec 90 18:10:20 GMT References: <8685.9012070015@pyrltd.pyra.co.uk> Reply-To: greeny@top.cis.syr.edu (Jonathan Greenfield) Organization: CIS Dept., Syracuse University Lines: 34