From patchwork Thu Nov 27 15:12:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 41626 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 81EFF2486D for ; Thu, 27 Nov 2014 15:13:36 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id d49sf3304366eek.4 for ; Thu, 27 Nov 2014 07:13:35 -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=a0MGIbBh//U+SUq00qkb9mwPi1mRcYN9NunUUULr6lM=; b=ISCx5P3oZnQOAvNVPk8ab/3ek1VR68KlkiBDzi6Ncj0uKq/9CD527Vt+JZnl3VSM99 CoFLtiTZJ/khU+d2iFXz+dlorfRIuu8/BHl1ij2CT+5W6YSj3uIILSlZaJTH3mPfbUBw 5u2RtOAauy433BJQH8ZuCuMn1hz/BzBbqY09zlDMXvP3VDAA6LJIDM5h2tkI5TPGt3ah w2oa2dvytjCt3QKsbgGaelQnMHrv47cQ5bdDiIELAUrWiS3oPlgCViuhpQs6wfobjYqS xoskcRCtg4y7/v8DRvE9QyXSkyA26b73uNOQWgohIM+7atSTUs04iynG8afjJibY+bM0 z2qQ== X-Gm-Message-State: ALoCoQnvDS8GXq3QNOZ1BEMTp2OYgavftOxGcNxeUzFtcG3f04PheLzHOe7PiE1WgP1+DmXZffxX X-Received: by 10.180.19.42 with SMTP id b10mr10238955wie.0.1417101215420; Thu, 27 Nov 2014 07:13:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.168 with SMTP id u8ls768891lag.103.gmail; Thu, 27 Nov 2014 07:13:35 -0800 (PST) X-Received: by 10.112.133.138 with SMTP id pc10mr39856236lbb.48.1417101215127; Thu, 27 Nov 2014 07:13:35 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id j6si7557706laa.71.2014.11.27.07.13.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Nov 2014 07:13:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gf13so4412977lab.28 for ; Thu, 27 Nov 2014 07:13:35 -0800 (PST) X-Received: by 10.153.7.170 with SMTP id dd10mr39194939lad.44.1417101215020; Thu, 27 Nov 2014 07:13:35 -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 ew9csp811767lbc; Thu, 27 Nov 2014 07:13:34 -0800 (PST) X-Received: by 10.140.21.106 with SMTP id 97mr53869305qgk.61.1417101213674; Thu, 27 Nov 2014 07:13:33 -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 hq7si8843959qcb.4.2014.11.27.07.13.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 27 Nov 2014 07:13:33 -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 1Xu0l9-0004hh-TM; Thu, 27 Nov 2014 15:13:31 +0000 Received: from mail-la0-f45.google.com ([209.85.215.45]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xu0kt-0004fv-33 for lng-odp@lists.linaro.org; Thu, 27 Nov 2014 15:13:15 +0000 Received: by mail-la0-f45.google.com with SMTP id gq15so4306502lab.4 for ; Thu, 27 Nov 2014 07:13:09 -0800 (PST) X-Received: by 10.152.36.232 with SMTP id t8mr34454543laj.6.1417101189546; Thu, 27 Nov 2014 07:13:09 -0800 (PST) Received: from macmini.lan (84-217-193-77.tn.glocalnet.net. [84.217.193.77]) by mx.google.com with ESMTPSA id y3sm434075lad.7.2014.11.27.07.13.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Nov 2014 07:13:08 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 27 Nov 2014 16:12:58 +0100 Message-Id: <1417101181-13500-3-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417101181-13500-1-git-send-email-ola.liljedahl@linaro.org> References: <1417101181-13500-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 2/5] linux-generic: odp_barrier.c: 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.215.41 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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) 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..c1a01d8 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(); }