From patchwork Tue Nov 29 02:20:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 128199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B70B41007D2 for ; Tue, 29 Nov 2011 13:20:46 +1100 (EST) Received: (qmail 21676 invoked by alias); 29 Nov 2011 02:20:43 -0000 Received: (qmail 21661 invoked by uid 22791); 29 Nov 2011 02:20:42 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Nov 2011 02:20:28 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAT2KR98019783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 28 Nov 2011 21:20:28 -0500 Received: from anchor.twiddle.net (vpn-228-150.phx2.redhat.com [10.3.228.150]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAT2KR3t013481; Mon, 28 Nov 2011 21:20:27 -0500 Message-ID: <4ED4416B.5030607@redhat.com> Date: Mon, 28 Nov 2011 18:20:27 -0800 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Alan Modra , GCC Patches Subject: [libgomp] Define memmodel X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This fixes the ordering issues with a couple of Alan's pending patches, and put the enumeration where the entire library can use it. Committed. r~ * libgomp.h (enum memmodel): New. diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index 9cf9d32..2c9c071 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -45,6 +45,17 @@ # pragma GCC visibility push(hidden) #endif +/* If we were a C++ library, we'd get this from . */ +enum memmodel +{ + MEMMODEL_RELAXED = 0, + MEMMODEL_CONSUME = 1, + MEMMODEL_ACQUIRE = 2, + MEMMODEL_RELEASE = 3, + MEMMODEL_ACQ_REL = 4, + MEMMODEL_SEQ_CST = 5 +}; + #include "sem.h" #include "mutex.h" #include "bar.h"