Dealing with Unix character devices?
David T. Lewis
lewis at mail.msen.com
Thu Aug 28 13:37:56 UTC 2003
On Thu, Aug 28, 2003 at 09:27:51AM -0400, David T. Lewis wrote:
>
> You can set a file stream on /dev/ttyS0 for nonblocking reads using
> OSProcess. Look for methods called setNonblocking* or something like
> that (I'm away from my Squeak box so I can't give you this exact
> references). This will let you set up a nonblocking file stream on
> /dev/ttyS0, and you could use a process with a polling loop to handle
> the incoming data. Crude, but it works.
>
> I've implemented event-driven reads with Ian's aio functions in the
> Unix VM, but I don't think it's in any of the stuff I've released
> on the list yet. I'll try to get you a copy (probably this weekend).
> The required primitives are already on the OSPP plugin, it just needs
> a little support code to forward the "data ready on /dev/ttyWhatever"
> event to a semaphore in Squeak.
Correction, I guess I did release this to the list:
<http://swiki.gsug.org:8080/sqfixes/3787.html>
Dave
More information about the Squeak-dev
mailing list
|