Path: utzoo!attcan!uunet!wuarchive!usc!apple!olivea!orc!inews!iwarp.intel.com!psueea!pdxgate!eecs!griffith From: griffith@eecs.cs.pdx.edu (Michael Griffith) Newsgroups: comp.sys.amiga.tech Subject: Re: stopping multitasking Message-ID: <102@pdxgate.UUCP> Date: 18 Sep 90 11:36:52 GMT References: <4440@crash.cts.com> Sender: news@pdxgate.UUCP Lines: 27 lkoop@pnet01.cts.com (Lamonte Koop) writes: >I have a question relating to the use of the system call Forbid() and >Disable()...I am currently writing a benchmarking program which implements [rest deleted]... >smaller amounts]. I know the confusion I have here is based on a >misunderstanding of these functions, so could someone kindly give me a clue as >to what's up here? Also, what would be the best function of these two to use >for the most accurate results? >Thanks in advance: >---LaMonte Well the functions Forbid() and Disable() were not meant to be called together. Forbid() disables the task-switching mechanism of the Amiga OS, thus ensuring that your task is the only one running, however it does not disable interrupts. Disable() also disables task-switching plus the interrupts. Since Disable()ing is hazardous over long (read long relative to instruction execution speed) amounts of time due to problems like over flowing buffers, etc., I believe you will find Forbid() to be your most likely choice. Forbid() should tend to run slower, but is safer. In most cases, Disable() is only needed when accessing data structures that may be modified or read by interrupt routines. | Michael Griffith | If I had an opinion it certainly | | griffith@eecs.ee.pdx.edu | wouldn't be the same one as | | ...!tektronix!psueea!eecs!griffith | Portland State University anyways. |