🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: C programming/mutitasking query

#2237
From: Chuck McManis
Date: Sun, 19 Nov 1989 23:38
23 lines
1683 bytes
In article <OWHITE.89Nov19135047@haywire.nmsu.edu> (Owen White) writes:
>I have a program that I've written that displays on the current screen
>a insect (sprite-driven) that I usualy run in the backround, much like
>the infamous oing-series written by leo schwab.  I am looking for
>suggestions on how I can interupt this program during disk
>accesses/compiling/other expensive cpu accesses.  

Easy one Owen, since the Amiga has a preemptive scheduler you can just
set the priority of your insect to a value that is lower than the trackdisk
task and "standard" tasks. Then when ever *you* need the CPU to do something
you get it, no questions asked, but if no one needs it, your sprite task
gets it.

>I guess the buzzing insect has so many WaitTOF()s that the little guy really 
>slows up the system, especially text scrolling.

WaitTOF() is friendly because it does a real wait, it's WaitBOVP() that does
the busywait.

--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"
Technical Details
Message-ID: <128121@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!usc!apple!sun-barr!newstop!sun!pepper!cmcmanis
References: <OWHITE.89Nov19135047@haywire.nmsu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!usc!apple!sun-barr!newstop!sun!pepper!cmcmanis
From: cmcmanis%pepper@Sun.COM (Chuck McManis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: C programming/mutitasking query
Message-ID: <128121@sun.Eng.Sun.COM>
Date: 19 Nov 89 23:38:11 GMT
References: <OWHITE.89Nov19135047@haywire.nmsu.edu>
Sender: news@sun.Eng.Sun.COM
Reply-To: cmcmanis@sun.UUCP (Chuck McManis)
Distribution: comp.sys.amiga.tech
Organization: Sun Microsystems, Mountain View
Lines: 23