Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!eru!hagbard!sunic!dkuug!diku!bombadil From: bombadil@diku.dk (Kristian Nielsen) Newsgroups: comp.sys.amiga.programmer Subject: Re: Help with forbid() Message-ID: <1991Jan28.161307.25021@odin.diku.dk> Date: 28 Jan 91 16:13:07 GMT References: <1991Jan27.171304.802@isis.cs.du.edu> Sender: news@odin.diku.dk (Netnews System) Organization: Department of Computer Science, U of Copenhagen Lines: 27 dbucciar@isis.cs.du.edu (Dom Bucciarelli) writes: >I'm trying to use the forbid() call to stop multitasking while I do a >benchmark code segment. Unfortunately, I don't know how to tell my Are you sure you wouldn't want to use Disable()/Enable() instead, to turn off interrupts as well? This is even more cruel to the multitasking environment than forbid()/permit(), but otherwise the CPU still spends time in the interrupt handlers. Just use something like this: . . void main(void){ Disable(); /* Do benchmark... */ Enable(); } Kristian ========================================================================== Kristian Nielsen | /// Only the AMIGA Student at DIKU, University of Copenhagen | /// (Department of Computer Science) | \\\/// makes it possible! Denmark | \XX/ ==========================================================================