Path: utzoo!utgpu!attcan!uunet!lll-winken!ames!hc!pprg.unm.edu!unmvax!tut.cis.ohio-state.edu!rutgers!mit-eddie!killer!texbell!sw1e!uucibg From: uucibg@sw1e.UUCP (3929] Brian Gilstrap) Newsgroups: comp.sys.mac.programmer Subject: Question on Handle locking example Message-ID: <1219@sw1e.UUCP> Date: 25 Jan 89 13:30:12 GMT References: <379@lclark.UUCP> <2580011@hpausla.HP.COM> Reply-To: uucibg@sw1e.UUCP ([5-3929] Brian Gilstrap) Organization: Southwestern Bell Telephone Co. Lines: 18 I'm not clear on why function 'a' below would die. This was posted recently as an example of how not to code. I'm sure I'm missing something extremely obvious (it's late...), but please explain.... >a() >{ > HLock(h); > b(h); > *h->x = ... /* this would not survive a heap scramble */ > HUnlock(h); >} Thanks, Brian R. Gilstrap Southwestern Bell Telephone One Bell Center Rm 17-G-4 ...!ames!killer!texbell!sw1e!uucibg St. Louis, MO 63101 ...!bellcore!texbell!sw1e!uucibg (314) 235-3929 #include