🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4352

Re: Bug in AddSemaphore()!

#4352
From: Peter rb{k
Date: Thu, 12 Jul 1990 12:20
50 lines
1908 bytes
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 <exec/execbase.h>
>...
>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
><proto/exec.h> 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."                                         *
**************************************************************
Technical Details
Message-ID: <1990Jul12.122030.1809@daimi.dk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!dkuug!daimi!poe
References: <1990Jul9.185240.8666@daimi.dk> <ROSENBER.90Jul10174434@ra.abo.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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> <ROSENBER.90Jul10174434@ra.abo.fi>
Sender: news@daimi.dk
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Lines: 50