Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!pa.dec.com!shodha.enet.dec.com!elvira!ridder From: ridder@elvira.enet.dec.com (Hans Ridder) Newsgroups: comp.sys.amiga.programmer Subject: Re: What's a Hanging Forbid!? Message-ID: <2405@shodha.enet.dec.com> Date: 29 Jan 91 18:32:16 GMT References: <1991Jan28.171326.6363@maytag.waterloo.edu> Sender: news@shodha.enet.dec.com Organization: Digital Equipment Corporation, Customer Support Center Lines: 27 In article <1991Jan28.171326.6363@maytag.waterloo.edu> himacdon@maytag.uwaterloo.ca (Hamish Macdonald) writes: >>>>>> In article , chris@genly.UUCP (Chris Hind Genly) writes: >Chris> You would use Forbid()/Permit() when accessing structures >Chris> shared by several tasks to prevent the structure from being >Chris> modified while you were working on it. > >No, you should use SEMAPHORES when accessing structures shared by >several tasks to prevent the structure from being modified while you >were working on it. What semaphore would you suggest I use to access the Exec Task list? I assume you were trying to say that when there is a choice, Semaphores should be used instead of Forbid/Permit, because they are more "multitasking friendly". However, Semaphores are useless if you're the only one using them. In the case of *most* of the V1.3 system structures and lists, Forbid/Permit is *required*, i.e. there is no choice. >himacdon@maytag.uwaterloo.ca watmath!maytag!himacdon -hans ------------------------------------------------------------------------ Hans-Gabriel Ridder Digital Equipment Corporation ridder@elvira.enet.dec.com Customer Support Center ...decwrl!elvira.enet!ridder Colorado Springs, CO