From patchwork Tue Nov 25 22:37:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 41510 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CC9D25E72 for ; Tue, 25 Nov 2014 22:38:28 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id s18sf1056077lam.2 for ; Tue, 25 Nov 2014 14:38:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=7cCOv9wxe2X41YVbiVKxvOj0BPN3rW6JH7VZOXrMehE=; b=KrH2ubVAyqB0rlb8u1F+RbpAGoPFGeTRfmBWaaj5+Vw5rJiyNnTV5ocSmCvAxdWFY6 b5LilE6dEwfUqASTcuKxlY37YgA4X8yLn7vB/d9XaleCeKlQRhxpEWStDs3MGEn4Jr2h qXno40D9zkpMT88MD3vGz0RP+ZwOqaOK+dG96RTSecxuyRN3qrUyVlXr/sdBrN0PwwWE OfAuCXsSz+/NMAdGTlUf3jE0UGfBaG1grrXwaMe3s89ZpuZ0WS6gGr58pNNGujwnW76L NFEMVLUfCNV3Zw1SdkW1KtmbBpG39qk2PVx+XrU0MvzhlidXQpmjeNY4VUzJTD1D7/QT 3Lww== X-Gm-Message-State: ALoCoQkwdrviRulinNULKUXlBIYAQGZJQsDIkee3zakkI2zylAHPo9Mqg1kPMnYVABJHIDGAYmz7 X-Received: by 10.112.168.228 with SMTP id zz4mr7271946lbb.7.1416955106858; Tue, 25 Nov 2014 14:38:26 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.129 with SMTP id t1ls705635lag.53.gmail; Tue, 25 Nov 2014 14:38:26 -0800 (PST) X-Received: by 10.112.159.129 with SMTP id xc1mr31069445lbb.24.1416955106578; Tue, 25 Nov 2014 14:38:26 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id h9si2583275lag.126.2014.11.25.14.38.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 14:38:26 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id 10so1451222lbg.36 for ; Tue, 25 Nov 2014 14:38:26 -0800 (PST) X-Received: by 10.112.62.166 with SMTP id z6mr30151173lbr.74.1416955106459; Tue, 25 Nov 2014 14:38:26 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp532012lbc; Tue, 25 Nov 2014 14:38:25 -0800 (PST) X-Received: by 10.221.46.135 with SMTP id uo7mr16519472vcb.42.1416955105241; Tue, 25 Nov 2014 14:38:25 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id xq8si945087vdc.76.2014.11.25.14.38.24 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Nov 2014 14:38:25 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XtOkY-00042N-QK; Tue, 25 Nov 2014 22:38:22 +0000 Received: from mail-lb0-f178.google.com ([209.85.217.178]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XtOkH-00041O-TT for lng-odp@lists.linaro.org; Tue, 25 Nov 2014 22:38:06 +0000 Received: by mail-lb0-f178.google.com with SMTP id f15so1566928lbj.37 for ; Tue, 25 Nov 2014 14:38:00 -0800 (PST) X-Received: by 10.152.37.69 with SMTP id w5mr30275913laj.67.1416955080315; Tue, 25 Nov 2014 14:38:00 -0800 (PST) Received: from macmini.lan (84-217-193-77.tn.glocalnet.net. [84.217.193.77]) by mx.google.com with ESMTPSA id vr7sm696196lbb.21.2014.11.25.14.37.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Nov 2014 14:37:59 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Tue, 25 Nov 2014 23:37:46 +0100 Message-Id: <1416955068-6580-3-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416955068-6580-1-git-send-email-ola.liljedahl@linaro.org> References: <1416955068-6580-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/4] linux-generic: odp_barrier.h: use odp_atomic_internal.h X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ola.liljedahl@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Ola Liljedahl --- Use definitions from odp_atomic_internal.h. platform/linux-generic/odp_barrier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_barrier.c b/platform/linux-generic/odp_barrier.c index 3a511b2..2fef386 100644 --- a/platform/linux-generic/odp_barrier.c +++ b/platform/linux-generic/odp_barrier.c @@ -7,6 +7,7 @@ #include #include #include +#include void odp_barrier_init(odp_barrier_t *barrier, int count) { @@ -32,7 +33,7 @@ void odp_barrier_wait(odp_barrier_t *barrier) uint32_t count; int wasless; - __atomic_thread_fence(__ATOMIC_SEQ_CST); + ODP_FULL_BARRIER(); count = odp_atomic_fetch_inc_u32(&barrier->bar); wasless = count < barrier->count; @@ -45,5 +46,5 @@ void odp_barrier_wait(odp_barrier_t *barrier) odp_spin(); } - __atomic_thread_fence(__ATOMIC_SEQ_CST); + ODP_FULL_BARRIER(); }