Path: utzoo!attcan!uunet!glyph!ahh From: ahh@glyph.UUCP (Andy Heffernan) Newsgroups: comp.sys.amiga.tech Subject: Re: Task synchronization Keywords: boffin Message-ID: <486@glyph.UUCP> Date: 22 Oct 89 20:56:40 GMT References: <483@glyph.UUCP> <8230@cbmvax.UUCP> Reply-To: ahh@glyph.UUCP (Andy Heffernan) Organization: Tiffany Fan Club Headquarters Lines: 19 In article <8230@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: >In article <483@glyph.UUCP> ahh@glyph.UUCP (Andy Heffernan) writes: >> while (FindTask(task_name)) ; /* No raciness */ >> >> < deallocate stack and Task > > > Matt showed a very good way. My comment is on your FindTask() >busy-loop: this is VERY nasty to the system, as FindTask(name) must >Disable() in order to search the task lists. No argument on the nastiness -- that's why I asked. What I wound up doing is having the initiating process issue the kill message, and having the task code (upon receipt of the message) clean up, Forbid(), and then ReplyMsg(). The initiating process gets kicked loose once RemTask() finishes, and then it goes and cleans itself up. Kosher?