🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Amigix (Re: alarm() function)

#11924
From: Deven Corzine
Date: Thu, 23 Mar 1989 02:11
45 lines
3002 bytes
In article <6363@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
 >In article <SHADOW.89Mar19085542@pawl24.pawl.rpi.edu> shadow@pawl.rpi.edu (Deven Thomas Corzine) writes:
 >>In article <70@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes:
 >>>Has anybody written a Unix compatible alarm() function on the amiga.  For
 >>>those not familiar, and to be more specific, its definition is
 >...
 >>This same system task would also coordinate the alarm() function by
 >>sending requests to the timer device, and only acting on the one most
 >>recently defined by an alarm() call.  (and AbortIO on any others, if
 >>the timer.device supports it; otherwise simply deallocate and ignore
 >>the IO request when it finally returns.)

 >        NO!  NEVER deallocate or reuse an IO request until it has been
 >returned by the device (and yes timer supports abortio, all devices must
 >"support" it, though not all devices will actually try to stop the io in
 >mid-stream.)  Normal abort is AbortIO();WaitIO().

I suppose I should have made that more clear.  What I meant was the
system task would AbortIO() the pending request, and allocate a new
one for the new request.  When the original request was returned, it
would then be deallocated.  (That would be caught at the Wait() in the
main loop.)  I was not suggesting to reuse the IO request.  The
requests, like most everything else, would be in an Exec list, pending
removal when returned from the device.

 >>>Also, the function should return the number of seconds remaining from a
 >>>previous alarm request.
 >>
 >>CheckIO() should work for that, I think.

 >        CheckIO only tells you whether the request hs finished.

True.  I suppose you could look at the IOrequest which probably
contains the remaining time, but that's not legal, and not nice at
all.  So, the question is, is there a legal way to find the time
remaining on a timer request?  AbortIO/WaitIO and THEN check the time
fields?  Something else?  (Preferably something that won't break in
the future...)

Deven
--
------- shadow@pawl.rpi.edu ------- Deven Thomas Corzine ---------------------
Cogito  shadow@acm.rpi.edu          2346 15th Street            Pi-Rho America
ergo    userfxb6@rpitsmts.bitnet    Troy, NY 12180-2306         (518) 272-5847
sum...     In the immortal words of Socrates:  "I drank what?"     ...I think.
Technical Details
Message-ID: <DEVEN.89Mar22211102@daniel.rpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!leah!rpi!rpi.edu!deven
References: <70@snll-arpagw.UUCP> <SHADOW.89Mar19085542@pawl24.pawl.rpi.edu> <6363@cbmvax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!leah!rpi!rpi.edu!deven
From: deven@rpi.edu (Deven Corzine)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Amigix (Re: alarm() function)
Message-ID: <DEVEN.89Mar22211102@daniel.rpi.edu>
Date: 23 Mar 89 02:11:02 GMT
References: <70@snll-arpagw.UUCP> <SHADOW.89Mar19085542@pawl24.pawl.rpi.edu> <6363@cbmvax.UUCP>
Sender: usenet@rpi.edu
Reply-To: shadow@pawl.rpi.edu (Deven Thomas Corzine)
Organization: RPI Public Access Workstation Lab, Troy NY
Lines: 45
In-reply-to: jesup@cbmvax.UUCP's message of 21 Mar 89 19:13:36 GMT