From owner-freebsd-arch@FreeBSD.ORG Tue Jun 4 16:03:59 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F28566C3; Tue, 4 Jun 2013 16:03:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id CFB2F1B17; Tue, 4 Jun 2013 16:03:58 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A82C9B94F; Tue, 4 Jun 2013 12:03:57 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: Kernelspace C11 atomics for MIPS Date: Tue, 4 Jun 2013 09:52:51 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <51ADA308.6040904@freebsd.org> In-Reply-To: <51ADA308.6040904@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201306040952.51513.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 04 Jun 2013 12:03:57 -0400 (EDT) Cc: Ed Schouten , Andre Oppermann , freebsd-mips@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: Tue, 04 Jun 2013 16:03:59 -0000 On Tuesday, June 04, 2013 4:19:20 am Andre Oppermann wrote: > On 03.06.2013 16:04, Ed Schouten wrote: > > Hi, > > > > As of r251230, it should be possible to use C11 atomics in > > kernelspace, by including ! Even when not using Clang > > (but GCC 4.2), it is possible to use quite a large portion of the API. > > I'm a bit wary of *kernel* developers using C11-native atomics as opposed > to our own atomic API. This could lead to a proliferation of home-grown, > more or less correctly working, locks and variants thereof (mostly less > correct). I think this is not a big deal to worry about as developers have already been free to do this via and haven't gone super crazy. Replacing with is probably fine and should be a simple drop-in replacement for our lock implementations. -- John Baldwin