Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!swrinde!ucsd!nosc!crash!pnet01!lkoop From: lkoop@pnet01.cts.com (Lamonte Koop) Newsgroups: comp.sys.amiga.programmer Subject: Re: Help with forbid() Message-ID: <7238@crash.cts.com> Date: 28 Jan 91 03:56:29 GMT Sender: root@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 33 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 >Lattice C compiler/linker where to find the routine. I assume it's in >"exec.lib" but don't know how to get at it. If you are doing direct library calls (avoiding linking with amiga.lib), the include file to use is proto/exec.h. [and the associated pragma include file if they are seperate on your system]. Otherwise, if you are linking with amiga.lib, blink will simply find it there. The prototype for Forbid() is simply: void Forbid(void) >Also, what is the "un-forbid()" call to re-enable multitasking? Or can I >let the program exit, expecting everything to go back to normal? The call to use is known as Permit(). DO NOT simply exit the program with a Forbid() in place [This is a "hanging Forbid()"]. Under 1.2, you'll get system hangs, and 1.3 is not very fond of it either on occasion. You should have one Permit() call for every Forbid() (They can be nested). >----------------------------------------------------------------------------- > >|o| Dom Bucciarelli |o| >|o| (dbucciar@nyx.cs.du.edu) |o| >--------------------------------------------------------------------------- LaMonte Koop Internet: lkoop@pnet01.cts.com ARPA: crash!pnet01!lkoop@nosc.mil UUCP: {hplabs!hp-sdd ucsd nosc}!crash!pnet01!lkoop A scientist is one who finds interest in the kinetic energy of Jell-O moving at ridiculous velocities...an engineer is one who can find a real-life application for such silliness.