Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!rena!lkbreth!trebor From: trebor@lkbreth.foretune.co.jp (Robert J Woodhead) Newsgroups: comp.sys.mac.programmer Subject: Re: Time Slicing? Message-ID: <9376@lkbreth.foretune.co.jp> Date: 28 May 91 02:33:46 GMT References: <1991May27.150858.47099@vaxb.acs.unt.edu> Organization: Foretune Co., Ltd. Tokyo Japan Lines: 30 kenc@vaxb.acs.unt.edu writes: >I'm wondering if it's possible to make a system call from a VBL task? >Can anyone help me out on this one? It's certainly possible to make a system call from a VBL. The problem is that it's almost certain that it will crash your machine. The root cause is that many (all?) of the ROM routines are not re-entrant, so if a program happens to be in ROM routine X when your VBL gets control, and it calls X, then when the program resumes, it may very well go blotto bigtime. This situation may have changed in the roms on the newer machines, but don't bet on it. Besides, this means your program wouldn't be portable to some Macs. Somewhere in IM or the tech notes there is a list of routines that cannot be called from INITs. The list of routines that cannot be called from VBL's is a superset of this list. Exactly what this superset is is unknown, and subject to change with each new version of roms and system software. In short -- DONT DO IT! -- +--------------------------------------------------------------------------+ | Robert J. Woodhead, Biar Games / AnimEigo, Incs. trebor@foretune.co.jp | | "The Force. It surrounds us; It enfolds us; It gets us dates on Saturday | | Nights." -- Obi Wan Kenobi, Famous Jedi Knight and Party Animal. |