From owner-freebsd-threads@FreeBSD.ORG Mon May 19 15:13:30 2003 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 E0E1037B41C for ; Mon, 19 May 2003 15:13:30 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3746A43F75 for ; Mon, 19 May 2003 15:13:30 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4JMDTwQ023706; Mon, 19 May 2003 18:13:29 -0400 (EDT) Received: from localhost (eischen@localhost)h4JMDTNK023701; Mon, 19 May 2003 18:13:29 -0400 (EDT) Date: Mon, 19 May 2003 18:13:28 -0400 (EDT) From: Daniel Eischen To: Alexander Kabaev In-Reply-To: <20030519174833.28db3cd2.ak03@gte.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: _pthread_cond_wait vs. __pthread_condwait 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: Mon, 19 May 2003 22:13:31 -0000 On Mon, 19 May 2003, Alexander Kabaev wrote: > The _pthread_cond_wait function has this at the beginning: > > _thr_enter_cancellation_point(curthread); > > if (cond == NULL) { > _thr_leave_cancellation_point(curthread); > and this at the end: > _thr_leave_cancellation_point(curthread); > > > __pthread_cond_wait is defined as > > _thr_enter_cancellation_point(curthread); > ret = _pthread_cond_wait(cond, mutex); > _thr_leave_cancellation_point(curthread); > return (ret); > > So what is the difference between the two? Should't cancellantion checks > ve removed from _pthread_cond_wait? Yes, and the weak references are wrong too (they should be to __pthread_cond_wait/__pthread_cond_timedwait). -- Dan Eischen