Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!usc!apple!bbn!bbn.com!levin From: levin@bbn.com (Joel B Levin) Newsgroups: comp.sys.mac.programmer Subject: Re: Integer Size problem Message-ID: <44696@bbn.COM> Date: 23 Aug 89 20:55:44 GMT References: <15141@dartvax.Dartmouth.EDU> <11689@cit-vax.Caltech.Edu> <1465@draken.nada.kth.se> Sender: news@bbn.COM Reply-To: levin@BBN.COM (Joel B Levin) Organization: BBN Communications Corporation Lines: 26 In article <1465@draken.nada.kth.se> d88-jwa@nada.kth.se (Jon W{tte) writes: |In article <11689@cit-vax.Caltech.Edu> palmer@tybalt.caltech.edu.UUCP (David Palmer) writes: |>A better way, clearer and probably faster, however is to just do: |> **(rect **)myHandle = myRect; |> |>You don't have to lock anything down, it is a single easy to understand | |Wrong. Incorrect. What happens if a interrupt happens between the set |pointers and the block move instruction ? And this interrupt happens |to shuffle memory ? LOCK THE HANDLES first ! ALWAYS ! 1. This was originally about windows, I thought. These don't use handles and aren't relocatable. (I know, this isn't stated this way.) 2. Interrupts are the things that aren't supposed to shuffle memory. If this is application code, shouldn't this construct be OK? |Both Inside Mac and the TechNotes tell us no to change any fields in |windows or GrafPorts directly. But since everybody's doing it, they |won't DARE change anything :-) /JBL = UUCP: levin@bbn.com (new) or {backbone}!bbn!levin (old) INTERNET: levin@bbn.com POTS: (617) 873-3463 "The night was"