Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!bagate!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: What's wrong with this picture?? Keywords: Exec 2.0 Task Message-ID: <16489@cbmvax.commodore.com> Date: 12 Dec 90 23:29:12 GMT References: <154108@felix.UUCP> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 36 This is an old message, but there have been no responses to it. In article <154108@felix.UUCP> wfischer@felix.UUCP (Bill Fischer) writes: >Assuming that program A started up program B by using the standard >technique of: > > LoadSeg() > CreateProc() /* prog.foo */ > PutMsg() > >then program A should be able to 'freeze' program B, to temporarily >suspend it's operation by calling the following fuction: [ code that mucks with the exec task lists, etc ] >And to 'unfreeze' (or restart) program B by calling the following >function: [ function that adds task back to an exec list] Your meltlist call uses AddTail instead of Enqueue. In any case, mucking with exec task structures like this is _WRONG_. Don't do it. If you need mutual exclusion, there are plenty of safe ways to implement it (Forbid() around critical sections, semaphores, etc, etc). If you're doing this to an external program you don't control, you should rethink why you want to do this. Sorry if I seem adamant, but this really is off-limits. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup Thus spake the Master Ninjei: "If your application does not run correctly, do not blame the operating system." (From "The Zen of Programming") ;-)