Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!nisca.ircc.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!funic!funic!vinsci From: vinsci@soft.fi (Leonard Norrgard) Newsgroups: comp.sys.amiga Subject: Re: Semaphores.. (Why don't we use them?!) Message-ID: Date: 30 Jun 90 19:24:16 GMT References: <708.268c872a@desire.wright.edu> Sender: vinsci@funic.funet.fi (Leonard Norrgard) Organization: Soft Service, Inc. Lines: 26 In-Reply-To: arc@desire.wright.edu's message of 30 Jun 90 16:04:10 GMT One of the reasons is that the exec.library:AddSemaphore() is broken in the V33 & V34 ROMS, see the RKM Includes & Autodocs BUGS description for AddSemaphore() for more info and a workaround. I bet that bug has caused much frustration... Another reason is of course that you can often achieve the same thing using other methods, like public message ports etc., depending on your needs of course. >are Tracksalve and some other program (I forget it;s's name). How come >more people don't use semaphrores? Wouldn't they help out a lot in some >areas? I know that semaphorses in a Vax is useful for synchronizing tasks... >Is this what they are used for on the Amiga? Would someone PLEASE elaborate? In PostDriver (our PostScript printer driver), we use a semaphore to make sure that the printer driver task gets a genuine set of the PostDriver preferences, either from the in memory settings, from the saved settings or as a last resort from the default settings. The in memory and saved-to-disk settings are protected by the semaphore so as to protect the printer driver to access the settings while the setup program is updating them. Use a semaphore instead of a Forbid() where you can, and the world will be happier. :-) -- Leonard