🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Task Switching Problem

#5799
From: Todd M. Lewis
Date: Fri, 12 Oct 1990 20:39
31 lines
2165 bytes
In article <14971@cbmvax.commodore.com> ken@cbmvax.commodore.com (Ken Farinsky - CATS) writes:
>In article <1990Oct8.152923.1447@uncecs.edu> utoddl@uncecs.edu writes:
>>
>>Ground rule double.  I don't need the time.  And I can fake the Relinquish()
>>call with something like {ULONG i; i=tc_Count; while(i==tc_Count);}
>>since tc_Count would be updated by tc_Switch().  So I waste a few cycles.
>
>AACK!!!  I hope that this is strictly educational and not a commercial
>product!  I thought that one of the first rules of software on the
>Amiga was:   Thou shalt not busy wait.

NAK!  It is (was) an educational experiment.  The code never made it
out of my office.  It was a monitor for another program (I needed
more information about how some tasks were interacting, and this 
didn't interfere--well it slowed everything down but didn't otherwise
alter the sequences) and has already been deleted.

It worked quite well, actually.  Thanks again for your help.

Hmmmm.  Would this work?  What if I had my task Wait() for some
signal, and have the tc_Switch() routine simply signal my task?
This should give me the same effect as Relinquish().
Can a tc_xxxxx() routine signal safely?
Darn it all--I've got to try this (now that I don't need it 
anymore, of course).  I just love rewriting code I just threw away.
_____        
  |      Todd M. Lewis            Disclaimer: If you want my employer's
  ||\/|  utoddl@ecsvax.uncecs.edu             ideas, you'll have to
  ||  || utoddl@ecsvax.bitnet, @unc.bitnet    _buy_ them. 
   |  || utoddl@next1.mscre.unc.edu 
       |___   ("Prgrms wtht cmmnts r lk sntncs wtht vwls." --TML)
Technical Details
Message-ID: <1990Oct12.203910.18240@uncecs.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!emory!hubcap!gatech!mcnc!ecsgate!ecsvax!utoddl
References: <1990Sep21.180100.28580@uncecs.edu> <14593@cbmvax.commodore.com> <14900@cbmvax.commodore.com> <1990Oct8.152923.1447@uncecs.edu> <14971@cbmvax.commodore.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!emory!hubcap!gatech!mcnc!ecsgate!ecsvax!utoddl
From: utoddl@uncecs.edu (Todd M. Lewis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Task Switching Problem
Message-ID: <1990Oct12.203910.18240@uncecs.edu>
Date: 12 Oct 90 20:39:10 GMT
References: <1990Sep21.180100.28580@uncecs.edu> <14593@cbmvax.commodore.com> <14900@cbmvax.commodore.com> <1990Oct8.152923.1447@uncecs.edu> <14971@cbmvax.commodore.com>
Organization: UNC Educational Computing Service
Lines: 31