From owner-freebsd-hackers Mon Mar 6 6:43:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailout01.sul.t-online.de (mailout01.sul.t-online.de [194.25.134.80]) by hub.freebsd.org (Postfix) with ESMTP id B843137BE0E for ; Mon, 6 Mar 2000 06:43:14 -0800 (PST) (envelope-from tboxberg@schuett-elektronik.de) Received: from fmrl03.sul.t-online.de by mailout01.sul.t-online.de with smtp id 12Ryil-0005um-00; Mon, 6 Mar 2000 15:42:55 +0100 Received: from mail.net (340061203289-0001@[62.158.174.187]) by fmrl03.sul.t-online.de with esmtp id 12Ryig-1FcSvYC; Mon, 6 Mar 2000 15:42:50 +0100 Received: from gateway.schuett-inhouse.de (localhost [127.0.0.1]) by mail.net (8.9.3/8.9.2) with ESMTP id PAA59888; Mon, 6 Mar 2000 15:41:42 +0100 (CET) (envelope-from titus@schuett-inhouse.de) Received: from schuett-inhouse.de (titus.schuett-inhouse.de [192.168.3.66]) by gateway.schuett-inhouse.de (8.9.3/8.9.2) with ESMTP id PAA59789; Mon, 6 Mar 2000 15:33:30 +0100 (CET) (envelope-from titus@schuett-inhouse.de) Message-ID: <38C3D047.42027DAD@schuett-inhouse.de> Date: Mon, 06 Mar 2000 15:35:35 +0000 From: Titus von Boxberg X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Pthread blocking I/O References: <200003061344.IAA09021@pcnet1.pcnet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Sender: 340061203289-0001@t-dialin.net Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Eischen wrote: > > > Apparently it is not possible to shutdown those > > threads from a third thread, neither using close nor shutdown(2) for > > the socket I/O if the threads are blocked during read. > > > > What methods can one use to unblock such a blocked-on-read > > thread? > > The current implementation of FreeBSD pthreads only grants access > to file descriptors to one thread at a time. I think if one thread and per direction (?) > tries to close a file descriptor from which another thread is > reading, that the thread trying to close will block until the > read completes. Thanks for your answer! What's the reason for locking the file descriptors for *all* system calls? especially those I mentioned? Where is pthread_cancel() ? TITUS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message