Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!tut.cis.ohio-state.edu!ucbvax!mtxinu!taniwha!paul From: paul@taniwha.UUCP (Paul Campbell) Newsgroups: comp.sys.mac.programmer Subject: Re: Having Fun? [Re: Standard File and Desk Accessories] Keywords: Globals, Party, Enough! Message-ID: <377@taniwha.UUCP> Date: 9 Jun 89 21:54:42 GMT References: <4972@umd5.umd.edu> <2026@husc6.harvard.edu> <22694@santra.UUCP> Reply-To: paul@taniwha.UUCP (Paul Campbell) Organization: Taniwha Systems Design, Oakland Lines: 41 In article <22694@santra.UUCP> jmunkki@santra.UUCP (Juri Munkki) writes: >To install the VBL task, you call this routine and to control what it does >you just change its variables. (Remember that this is "multitasking" so that >you have to use some sort of locking to prevent the vbl task from seeing >changes that aren't complete.) This brings up one of my chief beefs about the MacOS, if you are doing something like this involving: VBL's DDP socket listeners IO completion routines Deferred Tasks Device interrupt handlers in short anything asynchronous - there are no primitives short of 'or.w #$0700, sr' that you can use to do synchronization between application code and asynchronous code. I don't think that 'normal' applications should ever have to turn interrupts off, instead I think that the correct solution is to have a trap that defers the delivery of 'Deferred Tasks' untill the trap is called again to turn them on again. Since all the other above asynchronous operations can Q deferred tasks this is a lowest common denominator, and since the queueing of deferred tasks is relatively cheap it is also a relatively inexpensive solution. APPLE ARE YOU LISTENING? This brings up another issue I've never really pursued, I use the deferred task manager to process incoming DDP packets. (My DDP listener Q's a deffered task). IM V really only mentions DTs being delivered on the return from level 1 and 2 interrupts, it doesn't mention Appletalk ... however it does work - my question is: Does it work because Appletalk calls out queued deferred tasks on return from interrupts (to IPL 0) or do my tasks get called out after the next clock tick? I suspect the latter .... Paul -- Paul Campbell Taniwha Systems Design UUCP: ..!mtxinu!taniwha!paul Oakland CA AppleLink: D3213 Achtung! Ve are from ze Interface Police! Ve vant to look und feel!