🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #13991

Re: Help - Asynchronous I/O to/from files

#13991
From: Ed Hanway
Date: Fri, 02 Mar 1990 16:37
37 lines
2380 bytes
In article <1990Feb28.023511.4806@undergrad.cs.ubc.ca> apang@b0 (JVNIc7B7ktKDA) writes:
>In article <9830@cbmvax.commodore.com> mks@cbmvax.commodore.com (Michael Sinz - CATS) writes:
>>
>>Yes, you send packets to AmigaDos directly.  These are documented in the
>>AmigaDos manual (BANTAM Books, ISBN 0-553-34294-0)  The packets are
>>actually sent to the FileSystem and this all works wonderfully.
>
>I guess you'll miss all that BCPL stuff in 1.4 :)

The packet interface to AmigaDos devices has nothing to do with BCPL, other
than the fact that some of the fields in the packets are BPTRs. I highly
doubt that it will go away with 1.4.

Now the _real_ BCPL stuff, like global vectors and the secret BCPL run-time
library that some programs in the C: directory use -- the sooner that
goes away the better.

>Personally, I would have spawned a couple of tasks, which only used the upper
>level AmigaDOS routines--Open, Close, Read, Write, Lock, etc.  Then, throw in
>a few message ports to handle the I/O request "packets".  (In fact I did this
>for one of my courses last term, to demonstrate double buffered i/o--BTW, I
>wrote it in Modula-2.)

They must have been processes, not tasks.  This sounds fine for simple
double buffering, but since you're still using the synchronous DOS routines,
you would need a new process for each additional concurrent I/O operation.
If you send packets straight to the FileSystem, you can have as many
concurrent operations going on as you need.

What would be nice is a library with calls like async_Read(), async_Write(),
etc. that took care of the dirty work of assembling packets and sending them
to the DOS. In fact, I think Matt Dillon posted some code similar to this
last year.

Ed Hanway
Eastman Kodak Company	       ...!rochester!kodak!elmgate!jeh
#include <std_disclaimer.h>
Technical Details
Message-ID: <1221@elmgate.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!bbn!rochester!kodak!elmgate!jeh
References: <99009@linus.UUCP> <9830@cbmvax.commodore.com> <1990Feb28.023511.4806@undergrad.cs.ubc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!bbn!rochester!kodak!elmgate!jeh
From: jeh@elmgate.UUCP (Ed Hanway)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Help - Asynchronous I/O to/from files
Message-ID: <1221@elmgate.UUCP>
Date: 2 Mar 90 16:37:28 GMT
References: <99009@linus.UUCP> <9830@cbmvax.commodore.com> <1990Feb28.023511.4806@undergrad.cs.ubc.ca>
Sender: jeh@elmgate.UUCP
Reply-To: jeh@elmgate.UUCP (Ed Hanway)
Organization: Eastman Kodak Company, Rochester, NY
Lines: 37