Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 1996 16:52:53 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        stevenf@thetics.europa.com (Steven Frank)
Cc:        terry@lambert.org, freebsd-hackers@FreeBSD.org
Subject:   Re: Socket library question
Message-ID:  <199605212352.QAA02533@phaeton.artisoft.com>
In-Reply-To: <Pine.SUN.3.91.960521162531.29055A-100000@thetics.europa.com> from "Steven Frank" at May 21, 96 04:34:09 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > Which OS?
> >
> > If this is Win95 we're talking about here, then you probably implemented
> > these with the Win95 semaphore calls?
> 
>     The port was to Amiga OS, and yes the splx() emulation was done with 
> OS semaphore calls.  Amiga semaphore calls are non-counting and attempts 
> to obtain the semaphore block the task until the owning task releases 
> it.  In my implementation the TCP/IP stack, PPP interface, and serial 
> code are all rolled into one program that runs as a single task.  Perhaps 
> there is a similar problem with the Amiga's task scheduler as there is 
> with Win95?
> 
>     I realize that Amiga OS is not widely in use, but I'm just looking 
> for any leads or similar problems on other OSes that might make the light 
> bulb come on in my head.
> 
>     Do you think that the spl calls are the most likely cause of the 
> problem I described?

Ah... I have a low serial number Amiga 1000.  8-).

You should probably macrotize the spl calls, and inc a reference
count when you get the semaphore, and dec it when you let it go.
Then you can scream if the count goes above 1, and you've found
your bug.

The way you havled this in Win95 would be to check the count and
call a yield.

I don't know if you can unwind state sufficiently or not in the case
of a process reentering.  You might not be able to... it's been a
long time since I wrote Amiga code.  8-(.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605212352.QAA02533>