Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!shelby!rutgers!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: Task Switching Problem Message-ID: <15140@cbmvax.commodore.com> Date: 13 Oct 90 08:44:10 GMT References: <1990Sep21.180100.28580@uncecs.edu> Reply-To: valentin@cbmvax.commodore.com (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 33 In article <1990Oct12.203910.18240@uncecs.edu> utoddl@uncecs.edu (Todd M. Lewis) writes: > > Hmmmm. Would this work? What if I had my task Wait() for some > signal, and have the tc_Switch() routine simply signal my task? Uh, yes, that should work. But remember to clear the signal you would be waiting for, since it will get set every time you get switched out. In fact, you should do that within a Disable(): Disable(); clear signal; Wait(signal<<1); Enable(); > This should give me the same effect as Relinquish(). > Can a tc_xxxxx() routine signal safely? Signal() can be called safely from supervisor mode, from interrupts, from everything. > 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. If you were using the old file system on that disk, then perhaps you can use DiskSalv to recover your files. Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may destroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be