Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!inria!rouaix From: rouaix@inria.inria.fr (Francois Rouaix) Newsgroups: comp.sys.amiga.tech Subject: UnLoadSeg() Keywords: Waiting or not Message-ID: <1364@inria.inria.fr> Date: 3 Jul 89 09:33:53 GMT Organization: FR.A.U.G. Lines: 30 Hello dear techies, I have a doubt on the possibility that UnLoadSeg() might Wait() somewhere. Does anybody knows for sure ? The reason I ask this is the following: A program detaches itself from CLI (ya know, hacking the SegList), runs, and at the end, unloads itself with UnLoadSeg(). The very end of the code (ASM) looks like callsys Forbid * setup UnLoadSeg callsys UnLoadSeg moveq.l 0,d0 rts And occasionally, I get a Guru (4)... The only explanation I have yet is thatUnLoadSeg() waits, memory freed is reallocated, the last two lines get trashed, and boom. Am I wrong ? I could think of replacing the JSR to UnLoadSeg by a JMP, therefore using the RTS of the routine, but since this bug appears quite randomly, I'd like to be certain of its reason. Thanx for any help --Francois -- *- Francois Rouaix // We are all prisonners here * *- rouaix@inria.inria.fr \X/ of our own device * *- SYSOP of Sgt. Flam's Lonely Amigas Club. (33) (1) 39-55-84-59 (Videotext) * Disclaimer: Opinions expressed are my own, not those of my employer.