Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755966AbaBUWLN (ORCPT ); Fri, 21 Feb 2014 17:11:13 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:55759 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753361AbaBUWLJ (ORCPT ); Fri, 21 Feb 2014 17:11:09 -0500 Date: Fri, 21 Feb 2014 22:10:54 +0000 From: "Joseph S. Myers" X-X-Sender: jsm28@digraph.polyomino.org.uk To: "Paul E. McKenney" CC: Michael Matz , Linus Torvalds , Torvald Riegel , Will Deacon , Peter Zijlstra , Ramana Radhakrishnan , David Howells , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "mingo@kernel.org" , "gcc@gcc.gnu.org" Subject: Re: [RFC][PATCH 0/5] arch: atomic rework In-Reply-To: <20140221191318.GK4250@linux.vnet.ibm.com> Message-ID: References: <20140220083032.GN4250@linux.vnet.ibm.com> <20140220181116.GT4250@linux.vnet.ibm.com> <20140220185608.GX4250@linux.vnet.ibm.com> <20140220221027.GC4250@linux.vnet.ibm.com> <20140221191318.GK4250@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-OriginalArrivalTime: 21 Feb 2014 22:10:57.0947 (UTC) FILETIME=[CC0FAEB0:01CF2F51] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Feb 2014, Paul E. McKenney wrote: > This needs to be as follows: > > [[carries_dependency]] int getzero(int i [[carries_dependency]]) > { > return i - i; > } > > Otherwise dependencies won't get carried through it. C11 doesn't have attributes at all (and no specification regarding calls and dependencies that I can see). And the way I read the C++11 specification of carries_dependency is that specifying carries_dependency is purely about increasing optimization of the caller: that if it isn't specified, then the caller doesn't know what dependencies might be carried. "Note: The carries_dependency attribute does not change the meaning of the program, but may result in generation of more efficient code. - end note". -- Joseph S. Myers joseph@codesourcery.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/