From owner-freebsd-arch@FreeBSD.ORG Sat Nov 24 15:03:55 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 3F3AE7D2 for ; Sat, 24 Nov 2012 15:03:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id B15278FC08 for ; Sat, 24 Nov 2012 15:03:54 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so6848343lbb.13 for ; Sat, 24 Nov 2012 07:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=6nWnB7veConJ2MfUUyxpB17+g0tCUbThFb9ri6oYiSo=; b=uSvL2lpEkqvcmNDoXXQrWe3rvH+KLqf/Qh/+ycz51dNFid9/p3R6YutIllT4arinRW gHvLO+dVV56fj5y8qHPUTcPKgX5TAdMrete27ZstdS0JK0nOvul9MFtaGML1PF1RXQuZ I61B0VwK5re7HNCR9IZOH+Pb+9Tpywtb8x6aCOxKBoDjRg6Ga7jFTjf/sFKe2OTqkkO4 xCEYr4dpIXAYgx0RQZFwptduCc/B1QqY8Uf68fNx56ywDOJalGyPeR5KIxbya+QCgRHt YmiyrQcRFBLhsa09NSjjR2jQjoewWlpTPaVjPiLfwN8PDB76WvgXObnF7Uo6bV3to5Wg t4Pg== MIME-Version: 1.0 Received: by 10.152.162.1 with SMTP id xw1mr6305699lab.3.1353769433469; Sat, 24 Nov 2012 07:03:53 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.134.5 with HTTP; Sat, 24 Nov 2012 07:03:53 -0800 (PST) In-Reply-To: References: Date: Sat, 24 Nov 2012 15:03:53 +0000 X-Google-Sender-Auth: z9JyXj70GHhqowEVqshs5IdGa3M Message-ID: Subject: Re: [RFC] sema_wait_sig From: Attilio Rao To: Oleksandr Tymoshenko Content-Type: text/plain; charset=UTF-8 Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2012 15:03:55 -0000 On Fri, Nov 23, 2012 at 6:12 AM, 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 sema(9) primitive is considered obsolete/dying. You should really use mtx + condvar (so just go using cv_wait_sig() directly). I had a patch to remove it all from the kernel few years ago but I never got to commit it. It would be good if we can remove this primitive off before 10.0. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein