From patchwork Mon Nov 24 22:38:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 41439 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E900725E18 for ; Mon, 24 Nov 2014 22:39:38 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf2585470wiw.8 for ; Mon, 24 Nov 2014 14:39:38 -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=u44rC8TexvMVK+02/AmFfs3Gd5oH/WKdpZjT+AeE6fo=; b=XshohCRozwSTXoaibymH6F2RiIH8f/SGNDGeFLKzWyVfubdG1MfvYm499ODSsAVYhe GlEAohCuatXdtY2iBiCmBxiAIErBO6jO2ftiSBnep5HtCNrwtJmzBRYdg0aU8k7Nhdb3 gUt9sM9FV8MGOF3yNqa9H3HIF6BtdWDaWH3wzUd3gUWlR2f41JXbNdDRDUJCJmCVPg9+ pz3nL/v50P8DLLQLBrmJtH24Zq1y1jY6w6krcNdabJTovMwAhZBV4GwgLUrtKbrb/C5R lqgSXLW0zfU6SbUK6JCwrKDwp7KAAwZTRqRGuzmMSATXLdCRWTjrcgxiEAwNK10EoaOJ yOmQ== X-Gm-Message-State: ALoCoQlNYNfdIKcX2+7pMP6gvajgccLf2gzqbvNrTgKfyIt+Su2iSb/bfRYmCuyuvS0NjhaX4ju9 X-Received: by 10.112.188.199 with SMTP id gc7mr6745641lbc.6.1416868778058; Mon, 24 Nov 2014 14:39:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.133 with SMTP id ue5ls500727lac.6.gmail; Mon, 24 Nov 2014 14:39:37 -0800 (PST) X-Received: by 10.152.207.37 with SMTP id lt5mr2952744lac.66.1416868777828; Mon, 24 Nov 2014 14:39:37 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id xz9si16471966lbb.126.2014.11.24.14.39.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 14:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id s18so8375051lam.21 for ; Mon, 24 Nov 2014 14:39:37 -0800 (PST) X-Received: by 10.112.38.4 with SMTP id c4mr7154880lbk.46.1416868777751; Mon, 24 Nov 2014 14:39:37 -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 ew9csp348186lbc; Mon, 24 Nov 2014 14:39:36 -0800 (PST) X-Received: by 10.52.99.200 with SMTP id es8mr11284791vdb.0.1416868776311; Mon, 24 Nov 2014 14:39:36 -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 xb2si6949629vdb.28.2014.11.24.14.39.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Nov 2014 14:39:36 -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 1Xt2I9-0007qL-Rb; Mon, 24 Nov 2014 22:39:33 +0000 Received: from mail-lb0-f176.google.com ([209.85.217.176]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xt2Hj-0007m1-9v for lng-odp@lists.linaro.org; Mon, 24 Nov 2014 22:39:07 +0000 Received: by mail-lb0-f176.google.com with SMTP id p9so7389976lbv.35 for ; Mon, 24 Nov 2014 14:39:01 -0800 (PST) X-Received: by 10.152.170.194 with SMTP id ao2mr23121110lac.60.1416868741810; Mon, 24 Nov 2014 14:39:01 -0800 (PST) Received: from macmini.lan (84-217-193-77.tn.glocalnet.net. [84.217.193.77]) by mx.google.com with ESMTPSA id pr9sm2952957lbc.12.2014.11.24.14.39.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 14:39:01 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Mon, 24 Nov 2014 23:38:45 +0100 Message-Id: <1416868730-26140-5-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416868730-26140-1-git-send-email-ola.liljedahl@linaro.org> References: <1416868730-26140-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v3 4/9] linux-generic: odp_barrier.c use __atomic 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.48 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 --- Updated to use GCC __atomic barriers. Restored missing line. platform/linux-generic/odp_barrier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_barrier.c b/platform/linux-generic/odp_barrier.c index 87be2a1..de1bf60 100644 --- a/platform/linux-generic/odp_barrier.c +++ b/platform/linux-generic/odp_barrier.c @@ -33,8 +33,8 @@ void odp_barrier_wait(odp_barrier_t *barrier) uint32_t count; int wasless; - odp_sync_stores(); wasless = barrier->bar < barrier->count; + __atomic_thread_fence(__ATOMIC_SEQ_CST); count = odp_atomic_fetch_inc_u32(&barrier->bar); if (count == 2*barrier->count-1) { @@ -44,5 +44,5 @@ void odp_barrier_wait(odp_barrier_t *barrier) odp_spin(); } - odp_mem_barrier(); + __atomic_thread_fence(__ATOMIC_SEQ_CST); }