Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!dkuug!daimi!poe From: poe@daimi.dk (Peter rb{k) Newsgroups: comp.sys.amiga.tech Subject: Re: Bug in AddSemaphore()! Message-ID: <1990Jul12.122030.1809@daimi.dk> Date: 12 Jul 90 12:20:30 GMT References: <1990Jul9.185240.8666@daimi.dk> Sender: news@daimi.dk Organization: DAIMI: Computer Science Department, Aarhus University, Denmark Lines: 50 rosenber@ra.abo.fi (Robin Rosenberg INF) writes: >!This may already be widely known, but here it is: >! >!I think, that I have found a bug in the AddSemaphore() routine in >!exec.library. >It is even documented!, with a workaround reading like this Well, I don't have Includes & Autodocs 1.3, wish I had though! >#include >... >AddSemaphore(s) >struct SignalSemaphore *s >{ > InitSemaphore(s); > Forbid(); > Enqueue(&SysBase->SemaphoreList,s); > Permit(); >} Thanks, my workaround just doesn't add the semaphore to the list, that works fine also, FindSemaphore() ,of course, won't find it then. >[...] >The (Lattice 5.05) #pragma for RemSemaphore was also incorrect. Apparently >the stub in Amiga.lib is correct since things worked when I removed the > include. It should read: > #pragma syscall RemSemaphore 25e 801 >(I think it was 25e 901) >Just encourage people to get the latest available docs. The RKM >Includes&Autodocs for 1.3 has been available for quite a while now. Ok! :-> >----------- >Robin Rosenberg - Peter (poe@daimi.dk) -- ************************************************************** * "Who other than IBM would want to put a mainframe on * * everybodys desk." * **************************************************************