From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 23:44:48 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F372F16A4CE; Thu, 7 Oct 2004 23:44:47 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D1D243D1D; Thu, 7 Oct 2004 23:44:47 +0000 (GMT) (envelope-from deischen@gdeb.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i97Nijkq024645; Thu, 7 Oct 2004 19:44:45 -0400 (EDT) Date: Thu, 7 Oct 2004 19:44:45 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Mark Gooderum In-Reply-To: <4165C4FC.2010607@verniernetworks.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-gnats-submit@freebsd.org cc: archie@dellroad.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 23:44:48 -0000 On Thu, 7 Oct 2004, Mark Gooderum wrote: > Uncle. Okay - you're right, sigh. > > It's not so much that we're using fgets() as many/most C based parsing > libraries use stdio, bleh. > > As for why libc_r is cancellable... > > In 4.x _foo() sets the cancellation state and calls __foo() (for read, > write, et.al), in 5.3 it's reversed. Hmm, that's not what it looks like for read. In 4.x, read() sets the cancellation state and calls _read(). It looks like fgets() ends up calling __sread() which calls _read(), so I'm not sure how cancellation is getting set. Only read() in libc_r sets the cancellation point, not _read(). I'm looking at revision 1.11.2.4 of uthread/uthread.c; are we looking at the same version? -- Dan Eischen