From owner-freebsd-threads@FreeBSD.ORG Thu Jul 8 10:27:49 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 D0B4016A4CE for ; Thu, 8 Jul 2004 10:27:49 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 743DB43D53 for ; Thu, 8 Jul 2004 10:27:49 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i68ARmfP000471; Thu, 8 Jul 2004 06:27:48 -0400 (EDT) Date: Thu, 8 Jul 2004 06:27:48 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petr Holub In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: RE: sem_wait as cancellation point X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 10:27:49 -0000 On Thu, 8 Jul 2004, Daniel Eischen wrote: > On Thu, 8 Jul 2004, Petr Holub wrote: > > > > sem_wait() is a cancellation point in libpthread. > > > > No, it is not - at least according to my experience of 5.2.1-RELEASE-p9. > > When I use following snipplet of code, it keeps hanging in the pthread_join: > > You're using libc_r. libpthread is in -current. -bash-2.05b$ uname -a FreeBSD sirius 5.2-CURRENT FreeBSD 5.2-CURRENT #17: Sat Jul 3 20:04:16 EDT 2004 root@sirius:/usr/obj/usr/src/sys/sirius i386 -bash-2.05b$ ./sem_wait Creating thread. Sleeping for 5 secs. Initing semaphore. Posting semaphore. Waiting for semaphore (this should pass). Waiting for semaphore (this should hang). Trying to cancel the thread. Trying to join the thread. Finished. -- Dan Eischen