diff mbox

[v3,3/9] linux-generic: odp_buffer.c use odp_atomic.h

Message ID 1416868730-26140-4-git-send-email-ola.liljedahl@linaro.org
State Accepted
Commit 490537f1fd91b93b85c43f798dd57afe61f44b55
Headers show

Commit Message

Ola Liljedahl Nov. 24, 2014, 10:38 p.m. UTC
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
---
Updated to use odp_atomic.h functions.

 platform/linux-generic/odp_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

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,