Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!husc6!husc4!hadeishi From: hadeishi@husc4.HARVARD.EDU (mitsuharu hadeishi) Newsgroups: comp.sys.amiga Subject: Re: Taking Over Message-ID: <2450@husc6.UUCP> Date: Thu, 2-Jul-87 14:14:29 EDT Article-I.D.: husc6.2450 Posted: Thu Jul 2 14:14:29 1987 Date-Received: Sat, 4-Jul-87 07:43:04 EDT References: <3788@spool.WISC.EDU> Sender: news@husc6.UUCP Reply-To: hadeishi@husc4.UUCP (mitsuharu hadeishi) Distribution: comp Organization: Harvard Univ. Science Center Lines: 22 Summary: There are various levels of this, depending on what you need In article <3788@spool.WISC.EDU> derek@speedy.WISC.EDU (Derek Zahn) writes: >A question. What is the procedure for "taking over the machine" from the >workbench (so the program can be guaranteed all the resources) and then >giving it back when finished? Well, if you just want to make sure no other program steps on anything (like screen structures, etc.) while you are modifying them, then you have to do a Forbid()/Permit() which guarantees that you will be the only task running. This does not stop interrupts, however, which you typically would not want to stop anyway. These periods should be SHORT, VERY SHORT, and should be used sparingly. The only way to guarantee access to all resources is to hardwire your program to take over the machine at boot time, because if it is started later some other task might have taken over some other resources (like the serial port, etc.) before you started. What kind of resources do you want to be "guaranteed"? You realize the Amiga has a resource arbitration scheme so if another task is using a resource you cannot have access to it? In that case your program should simply wait for the resource or die. I really don't see much use in taking over the machine unless you are a VERY processor- intensive game program or something that needs all the sprites, etc. -Mitsu