From owner-svn-src-all@freebsd.org Wed Jun 6 13:57:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB839FF6DB4; Wed, 6 Jun 2018 13:57:03 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61A0775801; Wed, 6 Jun 2018 13:57:03 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [10.200.7.59] (unknown [137.122.64.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id F3482264B5; Wed, 6 Jun 2018 13:57:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.d.1.180523 Date: Wed, 06 Jun 2018 09:57:01 -0400 Subject: Re: svn commit: r334702 - head/sys/sys From: Ravi Pokala To: Benjamin Kaduk CC: Mateusz Guzik , src-committers , , Message-ID: <41069956-C0D7-43C6-93D7-A843D991E47B@panasas.com> Thread-Topic: svn commit: r334702 - head/sys/sys References: <201806060508.w56586c9053686@repo.freebsd.org> <6E6E92B2-7536-4281-8EAF-72823E84902E@panasas.com> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2018 13:57:03 -0000 -----Original Message----- From: on behalf of Benjamin Kaduk Date: 2018-06-06, Wednesday at 07:40 To: Ravi Pokala Cc: Mateusz Guzik , src-committers , , Subject: Re: svn commit: r334702 - head/sys/sys > On Wed, Jun 6, 2018 at 6:35 AM, Ravi Pokala wrote: >>=20 >> Hi Mateusz, >>=20 >> =EF=BB=BF-----Original Message----- >> From: on behalf of Mateusz Guzik >> Date: 2018-06-06, Wednesday at 01:08 >> To: , , >> Subject: svn commit: r334702 - head/sys/sys >>=20 >>> ... >>> #ifdef _KERNEL >>> #define malloc(size, type, flags) ({ = \ >>=20 >> Now that I'm taking another look at this, I'm confused as to why the ent= ire macro expansion is inside parentheses? (The braces make sense, since thi= s is a block with local variables which need to be contained.) >=20 > This is a gcc (and clang) extension to allow the macro body to be a code = block -- standard C gets unhappy with just the curly braces. https://gcc.gn= u.org/onlinedocs/gcc/Statement-Exprs.html is a maybe-relevant page that goog= le found me. "Neat." Thanks Ben. -Ravi > -Ben=20