From patchwork Mon Nov 24 22:38:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 41438 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6F88F25E18 for ; Mon, 24 Nov 2014 22:39:33 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf6231153eek.5 for ; Mon, 24 Nov 2014 14:39:32 -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=eTIDU9/Cyx/iNhIMktcFDRlc2phfjcpoONzuIkxueAs=; b=GQZh6VmnbB11v7W/8DpRQQ+5HdbyKiGhbqg/5VIiMnNXPXikjy2EKC3Kq+q1MPT7mw 4pZyssr+w7Tlqi4v5IBYRTAlBOtbhR2toBB31MvyJTjdELLQOACunXMW1xtE6jmsv7oo k8ZauhRNusZ1uYVmnnmmy99uuT9nKXT1pNtI7ztpTyPpo7F99wCjhhwBFBIgmz5U5Zb1 2qW34gcNJd44FPqF6BdXu0KeFGCL2nw30MjxBf1TvKjp3oJV8+Pb0RfZtWpo/9gEt9qt 3o1L1nbrUQ+vpEwC5hZI1t6ReoZ0+zm4O/pkc0n/XUZcpH1ONohvCvtZG4i1UUDnbJJ4 /yFw== X-Gm-Message-State: ALoCoQnLxtwV3n0VNR0KNK369d/0xh9gdQ2DkigzZD/V0dcKiGR07fq6cW+6e46eQlmc0LWz5yTI X-Received: by 10.112.89.195 with SMTP id bq3mr6855739lbb.9.1416868772644; Mon, 24 Nov 2014 14:39:32 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.137 with SMTP id b9ls516401lah.29.gmail; Mon, 24 Nov 2014 14:39:32 -0800 (PST) X-Received: by 10.152.25.168 with SMTP id d8mr23009273lag.41.1416868772476; Mon, 24 Nov 2014 14:39:32 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id jd8si12583935lbc.99.2014.11.24.14.39.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 14:39:32 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id hs14so8466535lab.36 for ; Mon, 24 Nov 2014 14:39:32 -0800 (PST) X-Received: by 10.152.9.7 with SMTP id v7mr22948484laa.40.1416868772270; Mon, 24 Nov 2014 14:39:32 -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 ew9csp348175lbc; Mon, 24 Nov 2014 14:39:31 -0800 (PST) X-Received: by 10.53.8.1 with SMTP id dg1mr8312720vdd.96.1416868771012; Mon, 24 Nov 2014 14:39:31 -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 ha9si531076vdb.16.2014.11.24.14.39.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Nov 2014 14:39:30 -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 1Xt2I4-0007po-Go; Mon, 24 Nov 2014 22:39:28 +0000 Received: from mail-lb0-f181.google.com ([209.85.217.181]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xt2Hi-0007m0-Q9 for lng-odp@lists.linaro.org; Mon, 24 Nov 2014 22:39:06 +0000 Received: by mail-lb0-f181.google.com with SMTP id 10so3595134lbg.12 for ; Mon, 24 Nov 2014 14:39:00 -0800 (PST) X-Received: by 10.112.171.6 with SMTP id aq6mr22941839lbc.28.1416868740818; Mon, 24 Nov 2014 14:39: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 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:00 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Mon, 24 Nov 2014 23:38:44 +0100 Message-Id: <1416868730-26140-4-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 3/9] linux-generic: odp_buffer.c use odp_atomic.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.49 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 odp_atomic.h functions. platform/linux-generic/odp_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_buffer.c b/platform/linux-generic/odp_buffer.c index d9e211b..bcbb99a 100644 --- a/platform/linux-generic/odp_buffer.c +++ b/platform/linux-generic/odp_buffer.c @@ -73,7 +73,8 @@ int odp_buffer_snprint(char *str, size_t n, odp_buffer_t buf) len += snprintf(&str[len], n-len, " cur_offset %zu\n", hdr->cur_offset); len += snprintf(&str[len], n-len, - " ref_count %i\n", hdr->ref_count); + " ref_count %i\n", + odp_atomic_load_u32(&hdr->ref_count)); len += snprintf(&str[len], n-len, " type %i\n", hdr->type); len += snprintf(&str[len], n-len,