From owner-freebsd-arch@FreeBSD.ORG Fri Nov 23 19:49:00 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D2BCDD2 for ; Fri, 23 Nov 2012 19:49:00 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0BD8FC12 for ; Fri, 23 Nov 2012 19:48:59 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id 16so11881313obc.13 for ; Fri, 23 Nov 2012 11:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pXuuhXmcJkLB05ZbFemF8jULJdQ2v/5vYzPLmilmjBU=; b=troIGBDJuJh7qBG78HyRuuDES6/wWoE6y7vgQ3DsQBumHuemkIBjzxSXdTgS5mvmaq Fg11JnJk+kYfxC3eGkF2vPgf0R7LGrxqGO77wMYYqx63Mp4CAoVAm3/iW8kTOARBx5r/ KEcVaDWG8R5h83zC0AfY9KQHOMnjBTWZxjIaYmoO3xHdBGsn+RW3tZi3l5ZlieyMrQpD ICSsEnNkgl4fX5TgqpmnYQXGUTORHieh6u1CfAx5z9nmwHCu3rkn3Q4lhcIwzvXKl0oB 0vA18rsRtYxmrBtsdxpe3qRDV6/UVvoWRtq2SeTLPPE8vBw+n8Honeaxfs8A4z48gVYb 7aAA== MIME-Version: 1.0 Received: by 10.182.172.74 with SMTP id ba10mr3681965obc.83.1353700139326; Fri, 23 Nov 2012 11:48:59 -0800 (PST) Received: by 10.76.143.33 with HTTP; Fri, 23 Nov 2012 11:48:59 -0800 (PST) In-Reply-To: References: Date: Fri, 23 Nov 2012 11:48:59 -0800 Message-ID: Subject: Re: [RFC] sema_wait_sig From: Garrett Cooper To: Oleksandr Tymoshenko Content-Type: text/plain; charset=ISO-8859-1 Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2012 19:49:00 -0000 On Thu, Nov 22, 2012 at 10:12 PM, Oleksandr Tymoshenko wrote: > Hello, > > Is there any particular reason FreeBSD does not have sema_wait_sig > function? It seems to be easily implementable using cv_wait_sig > function. > > The reason I'm asking is that I'm getting some Linux drivers > ported to FreeBSD and the code in question relies on semaphores > and there is no obvious alternative to down_interruptible function. > I realize that not all approaches to driver development are easily > mappable from OS to OS but in this case lack of cv_wait_sig seems > like gap in API. Unless of course there is strong rationale behind it. There were a bunch of ACKs when John Polstra wanted to do work add sema_wait_sig, but it looks like the work wasn't completed (or at least not committed back to FreeBSD proper): http://unix.derkeiler.com/Mailing-Lists/FreeBSD/arch/2004-06/0074.html . HTH, -Garrett