From owner-freebsd-hackers Tue May 21 18:09:42 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA22139 for hackers-outgoing; Tue, 21 May 1996 18:09:42 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id SAA22128 for ; Tue, 21 May 1996 18:09:33 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id KAA00231; Wed, 22 May 1996 10:53:30 +0930 From: Michael Smith Message-Id: <199605220123.KAA00231@genesis.atrad.adelaide.edu.au> Subject: Re: Socket library question To: stevenf@thetics.europa.com (Steven Frank) Date: Wed, 22 May 1996 10:53:29 +0930 (CST) Cc: freebsd-hackers@freebsd.org In-Reply-To: from "Steven Frank" at May 21, 96 11:10:10 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 [[