Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!ra!rosenber From: rosenber@ra.abo.fi (Robin Rosenberg INF) Newsgroups: comp.sys.amiga.tech Subject: Re: Amiga semaphores (HELP!) Message-ID: Date: 23 Sep 90 14:31:15 GMT References: <2290004@hp-ptp.HP.COM> <2290006@hp-ptp.HP.COM> Sender: rosenber@ra.abo.fi Organization: Abo Akademi University, Finland Lines: 17 In-reply-to: jimg@hp-ptp.HP.COM's message of 21 Sep 90 16:10:58 GMT Clearly the documentation on AddSemaphore() is misleading. Set the name and priority _after_ InitSemaphore(). You don't need to set the type since InitSemahore() does that. So it becomes: (Could this be added to introduction to comp.sys.amiga.tech since a lot of people get bitten by AddSemaphore() ) void LocalAddSemaphore(struct SignalSemaphore *SignalSemaphore, char *name) { InitSemaphore(SignalSemaphore); SignalSemaphore->ss_Link.ln_Name = name; SignalSemaphore->ss_Link.ln_Pri = 1; Forbid(); Enqueue(&SysBase->SemaphoreList,SignalSemaphore); Permit(); }