Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 1996 10:53:29 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        stevenf@thetics.europa.com (Steven Frank)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Socket library question
Message-ID:  <199605220123.KAA00231@genesis.atrad.adelaide.edu.au>
In-Reply-To: <Pine.SUN.3.91.960521105823.5950A-100000@thetics.europa.com> from "Steven Frank" at May 21, 96 11:10:10 am

next in thread | previous in thread | raw e-mail | index | archive | help
Steven Frank stands accused of saying:
> 
>     I have a very technical question about BSD socket library code, and 
> someone suggested this mailing list as a resource.

Not a bad place to start 8)

>     I have ported the BSD socket library to another OS, and added an 
> integrated PPP interface and modem dialer.  The ultimate goal is a 
> Trumpet WinSock-ish type of application.
>
>     It all seems to be working well except for one thing.  When a client 
> application calls recv(), and the recv() cannot be fulfilled immediately, 
> the kernel calls sbwait() which in turn calls tsleep().  Somehow the 
> appropriate wakeup is not happening and it stays in tsleep() 
> indefinitely.  

How much of the kernel did you port?!   You should start by looking at what
the original code is sleeping _on_, and find any/all wakeups that match it.
 
>     I realize this question is kind of a long shot, but does anyone know 
> what might be going on?  Other tsleeps() in the code get woken up 
> correctly.  Could there be a problem in my emulation of the splx() 
> calls?  Perhaps the kernel is fine, and the problem stems from the fact 
> that the PPP interface came from a different flavor of BSD than the kernel?

You may have missed the code that's responsible for the appropriate wakeup.
It's possible that the OS/network interface that you're layering on top 
of behaves sufficiently differently to FreeBSD that some condition/situation
is not being met.


-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and      (GSM mobile) 0411-222-496       [[
]] realtime instrument control          (ph/fax)  +61-8-267-3039        [[
]] Collector of old Unix hardware.      "Where are your PEZ?" The Tick  [[



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