From owner-freebsd-arch@FreeBSD.ORG Sat Jun 12 19:32:05 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59DD816A4CE for ; Sat, 12 Jun 2004 19:32:05 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1378843D4C for ; Sat, 12 Jun 2004 19:32:05 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i5CJUeQp094867; Sat, 12 Jun 2004 15:30:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i5CJUeLc094864; Sat, 12 Jun 2004 15:30:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sat, 12 Jun 2004 15:30:40 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: John Polstra In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-arch@freebsd.org Subject: Re: RFC: API change for sema_timedwait X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2004 19:32:05 -0000 On Sat, 12 Jun 2004, John Polstra wrote: > The reason I care about this is because I'd like to add new functions > sema_wait_sig() and sema_timedwait_sig() which can be interrupted by a > signal. Then sema_timedwait_sig could fail in two different ways: as a > result of a timeout or as a result of a signal. If these functions > returned proper errno values on failure, it would be easy to distinguish > between the two failure cases. > > This change would also make the return values of sema_timedwait, > sema_wait_sig, and sema_timedwait_sig consistent with the analogous > condition variable operations cv_timedwait, cv_wait_sig, and > cv_timedwait_sig and with tsleep and msleep. > > Does this change sound OK to you folks? This sounds entirely sensible to me. Make sure to update the man page :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research