Re: [lng-odp] [PATCH] Removed odp_atomic_int_t

2014-11-06 Thread Savolainen, Petri (NSN - FI/Espoo)


From: ext Santosh Shukla [mailto:santosh.shu...@linaro.org]
Sent: Wednesday, November 05, 2014 2:57 PM
To: Petri Savolainen
Cc: lng-odp-forward
Subject: Re: [lng-odp] [PATCH] Removed odp_atomic_int_t



On 31 October 2014 19:09, Petri Savolainen 
petri.savolai...@linaro.orgmailto:petri.savolai...@linaro.org wrote:
Integer version is not needed. Unsigned 32 and 64 bit atomics
are used instead. If signed 32/64 bits can be added later

instead - if signed 32/64 bits required then can be added later on need basis.

Yes. The word “needed” missing from commit message. Is it obvious from the 
context or could e.g. Maxim add that.


on need basis.

Signed-off-by: Petri Savolainen 
petri.savolai...@linaro.orgmailto:petri.savolai...@linaro.org
---
 platform/linux-generic/include/api/odp_atomic.h| 115 -
 platform/linux-generic/include/api/odp_barrier.h   |   4 +-
 .../linux-generic/include/odp_buffer_internal.h|   2 +-
 platform/linux-generic/odp_barrier.c   |   6 +-
 platform/linux-generic/odp_thread.c|   6 +-
 test/api_test/odp_atomic_test.c|  80 ++
 test/api_test/odp_atomic_test.h|   9 --
 7 files changed, 16 insertions(+), 206 deletions(-)

diff --git a/platform/linux-generic/include/api/odp_atomic.h 
b/platform/linux-generic/include/api/odp_atomic.h
index 213c81f..5c83b39 100644
--- a/platform/linux-generic/include/api/odp_atomic.h
+++ b/platform/linux-generic/include/api/odp_atomic.h
@@ -26,10 +26,6 @@ extern C {
  *  @{
  */

-/**
- * Atomic integer
- */
-typedef volatile int32_t odp_atomic_int_t;

 /**
  * Atomic unsigned integer 64 bits
@@ -43,117 +39,6 @@ typedef volatile uint32_t odp_atomic_u32_t;


 /**
- * Initialize atomic integer
- *
- * @param ptrAn integer atomic variable
- *
- * @note The operation is not synchronized with other threads
- */
-static inline void odp_atomic_init_int(odp_atomic_int_t *ptr)
-{
-   *ptr = 0;
-}
-
-/**
- * Load value of atomic integer
- *
- * @param ptrAn atomic variable
- *
- * @return atomic integer value
- *
- * @note The operation is not synchronized with other threads
- */
-static inline int odp_atomic_load_int(odp_atomic_int_t *ptr)
-{
-   return *ptr;
-}
-
-/**
- * Store value to atomic integer
- *
- * @param ptrAn atomic variable
- * @param new_value  Store new_value to a variable
- *
- * @note The operation is not synchronized with other threads
- */
-static inline void odp_atomic_store_int(odp_atomic_int_t *ptr, int new_value)
-{
-   *ptr = new_value;
-}
-
-/**
- * Fetch and add atomic integer
- *
- * @param ptrAn atomic variable
- * @param value  A value to be added to the variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_add_int(odp_atomic_int_t *ptr, int value)
-{
-   return __sync_fetch_and_add(ptr, value);
-}
-
-/**
- * Fetch and subtract atomic integer
- *
- * @param ptrAn atomic integer variable
- * @param value  A value to be subtracted from the variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_sub_int(odp_atomic_int_t *ptr, int value)
-{
-   return __sync_fetch_and_sub(ptr, value);
-}
-
-/**
- * Fetch and increment atomic integer by 1
- *
- * @param ptrAn atomic variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_inc_int(odp_atomic_int_t *ptr)
-{
-   return odp_atomic_fetch_add_int(ptr, 1);
-}
-
-/**
- * Increment atomic integer by 1
- *
- * @param ptrAn atomic variable
- *
- */
-static inline void odp_atomic_inc_int(odp_atomic_int_t *ptr)
-{
-   odp_atomic_fetch_add_int(ptr, 1);
-}
-
-/**
- * Fetch and decrement atomic integer by 1
- *
- * @param ptrAn atomic int variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_dec_int(odp_atomic_int_t *ptr)
-{
-   return odp_atomic_fetch_sub_int(ptr, 1);
-}
-
-/**
- * Decrement atomic integer by 1
- *
- * @param ptrAn atomic variable
- *
- */
-static inline void odp_atomic_dec_int(odp_atomic_int_t *ptr)
-{
-   odp_atomic_fetch_sub_int(ptr, 1);
-}
-
-/**
  * Initialize atomic uint32
  *
  * @param ptrAn atomic variable
diff --git a/platform/linux-generic/include/api/odp_barrier.h 
b/platform/linux-generic/include/api/odp_barrier.h
index 866648f..fb02a9d 100644
--- a/platform/linux-generic/include/api/odp_barrier.h
+++ b/platform/linux-generic/include/api/odp_barrier.h
@@ -31,8 +31,8 @@ extern C {
  * ODP execution barrier
  */
 typedef struct odp_barrier_t {
-   int  count;  /** @private Thread count */
-   odp_atomic_int_t bar;/** @private Barrier counter */
+   uint32_t count;  /** @private Thread count */
+   odp_atomic_u32_t bar;/** @private Barrier counter */
 } odp_barrier_t;


diff --git a/platform/linux-generic/include/odp_buffer_internal.h 
b

Re: [lng-odp] [PATCH] Removed odp_atomic_int_t

2014-11-06 Thread Santosh Shukla



 -void test_atomic_inc_dec_32(void);
 -void test_atomic_add_sub_32(void);
  void test_atomic_inc_dec_u32(void);
  void test_atomic_add_sub_u32(void);
  void test_atomic_inc_dec_64(void);
  void test_atomic_add_sub_64(void);



 so as we should replace above 2 api from _64 to _u64, right?



 I believe this is your code. I didn’t rename functions, just removed those
 using int atomics (signed 32). The _64 functions calls _u64 atomic APIs.
 So, would you like to align function naming  after this patch has been
 merged?




Okay.I'll send out patch depedent on this one.



  -Petri



___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] Removed odp_atomic_int_t

2014-11-06 Thread Savolainen, Petri (NSN - FI/Espoo)
This is the one thing from Ola's patch that everybody agrees (I guess). After 
rebase, Ola can send out separate patches each solving an individual problem. 


-Petri



 -Original Message-
 From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp-
 boun...@lists.linaro.org] On Behalf Of ext Maxim Uvarov
 Sent: Thursday, November 06, 2014 12:54 AM
 To: lng-odp@lists.linaro.org
 Subject: Re: [lng-odp] [PATCH] Removed odp_atomic_int_t
 
 Applying this patch will conflict with Ola's work right? Do we need take
 decision about Ola's patch?
 Which way we go with that patch or with Ola's?
 
 Maxim.
 
 On 11/05/2014 03:56 PM, Santosh Shukla wrote:
 
 
  On 31 October 2014 19:09, Petri Savolainen
  petri.savolai...@linaro.org mailto:petri.savolai...@linaro.org
 wrote:
 
  Integer version is not needed. Unsigned 32 and 64 bit atomics
  are used instead. If signed 32/64 bits can be added later
 
 
  instead - if signed 32/64 bits required then can be added later on
  need basis.
 
 
  on need basis.
 
  Signed-off-by: Petri Savolainen petri.savolai...@linaro.org
  mailto:petri.savolai...@linaro.org
  ---
   platform/linux-generic/include/api/odp_atomic.h| 115
  -
   platform/linux-generic/include/api/odp_barrier.h   |   4 +-
   .../linux-generic/include/odp_buffer_internal.h|   2 +-
   platform/linux-generic/odp_barrier.c   |   6 +-
   platform/linux-generic/odp_thread.c|   6 +-
   test/api_test/odp_atomic_test.c|  80
  ++
   test/api_test/odp_atomic_test.h|   9 --
   7 files changed, 16 insertions(+), 206 deletions(-)
 
  diff --git a/platform/linux-generic/include/api/odp_atomic.h
  b/platform/linux-generic/include/api/odp_atomic.h
  index 213c81f..5c83b39 100644
  --- a/platform/linux-generic/include/api/odp_atomic.h
  +++ b/platform/linux-generic/include/api/odp_atomic.h
  @@ -26,10 +26,6 @@ extern C {
*  @{
*/
 
  -/**
  - * Atomic integer
  - */
  -typedef volatile int32_t odp_atomic_int_t;
 
   /**
* Atomic unsigned integer 64 bits
  @@ -43,117 +39,6 @@ typedef volatile uint32_t odp_atomic_u32_t;
 
 
   /**
  - * Initialize atomic integer
  - *
  - * @param ptrAn integer atomic variable
  - *
  - * @note The operation is not synchronized with other threads
  - */
  -static inline void odp_atomic_init_int(odp_atomic_int_t *ptr)
  -{
  -   *ptr = 0;
  -}
  -
  -/**
  - * Load value of atomic integer
  - *
  - * @param ptrAn atomic variable
  - *
  - * @return atomic integer value
  - *
  - * @note The operation is not synchronized with other threads
  - */
  -static inline int odp_atomic_load_int(odp_atomic_int_t *ptr)
  -{
  -   return *ptr;
  -}
  -
  -/**
  - * Store value to atomic integer
  - *
  - * @param ptrAn atomic variable
  - * @param new_value  Store new_value to a variable
  - *
  - * @note The operation is not synchronized with other threads
  - */
  -static inline void odp_atomic_store_int(odp_atomic_int_t *ptr,
  int new_value)
  -{
  -   *ptr = new_value;
  -}
  -
  -/**
  - * Fetch and add atomic integer
  - *
  - * @param ptrAn atomic variable
  - * @param value  A value to be added to the variable
  - *
  - * @return Value of the variable before the operation
  - */
  -static inline int odp_atomic_fetch_add_int(odp_atomic_int_t *ptr,
  int value)
  -{
  -   return __sync_fetch_and_add(ptr, value);
  -}
  -
  -/**
  - * Fetch and subtract atomic integer
  - *
  - * @param ptrAn atomic integer variable
  - * @param value  A value to be subtracted from the variable
  - *
  - * @return Value of the variable before the operation
  - */
  -static inline int odp_atomic_fetch_sub_int(odp_atomic_int_t *ptr,
  int value)
  -{
  -   return __sync_fetch_and_sub(ptr, value);
  -}
  -
  -/**
  - * Fetch and increment atomic integer by 1
  - *
  - * @param ptrAn atomic variable
  - *
  - * @return Value of the variable before the operation
  - */
  -static inline int odp_atomic_fetch_inc_int(odp_atomic_int_t *ptr)
  -{
  -   return odp_atomic_fetch_add_int(ptr, 1);
  -}
  -
  -/**
  - * Increment atomic integer by 1
  - *
  - * @param ptrAn atomic variable
  - *
  - */
  -static inline void odp_atomic_inc_int(odp_atomic_int_t *ptr)
  -{
  -   odp_atomic_fetch_add_int(ptr, 1);
  -}
  -
  -/**
  - * Fetch and decrement atomic integer by 1
  - *
  - * @param ptrAn atomic int variable
  - *
  - * @return Value

Re: [lng-odp] [PATCH] Removed odp_atomic_int_t

2014-11-06 Thread Maxim Uvarov

On 11/06/2014 12:02 PM, Savolainen, Petri (NSN - FI/Espoo) wrote:

This is the one thing from Ola's patch that everybody agrees (I guess). After 
rebase, Ola can send out separate patches each solving an individual problem.


-Petri

Ola, do you confirm?

Maxim.






-Original Message-
From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp-
boun...@lists.linaro.org] On Behalf Of ext Maxim Uvarov
Sent: Thursday, November 06, 2014 12:54 AM
To: lng-odp@lists.linaro.org
Subject: Re: [lng-odp] [PATCH] Removed odp_atomic_int_t

Applying this patch will conflict with Ola's work right? Do we need take
decision about Ola's patch?
Which way we go with that patch or with Ola's?

Maxim.

On 11/05/2014 03:56 PM, Santosh Shukla wrote:


On 31 October 2014 19:09, Petri Savolainen
petri.savolai...@linaro.org mailto:petri.savolai...@linaro.org

wrote:

 Integer version is not needed. Unsigned 32 and 64 bit atomics
 are used instead. If signed 32/64 bits can be added later


instead - if signed 32/64 bits required then can be added later on
need basis.


 on need basis.

 Signed-off-by: Petri Savolainen petri.savolai...@linaro.org
 mailto:petri.savolai...@linaro.org
 ---
  platform/linux-generic/include/api/odp_atomic.h| 115
 -
  platform/linux-generic/include/api/odp_barrier.h   |   4 +-
  .../linux-generic/include/odp_buffer_internal.h|   2 +-
  platform/linux-generic/odp_barrier.c   |   6 +-
  platform/linux-generic/odp_thread.c|   6 +-
  test/api_test/odp_atomic_test.c|  80
 ++
  test/api_test/odp_atomic_test.h|   9 --
  7 files changed, 16 insertions(+), 206 deletions(-)

 diff --git a/platform/linux-generic/include/api/odp_atomic.h
 b/platform/linux-generic/include/api/odp_atomic.h
 index 213c81f..5c83b39 100644
 --- a/platform/linux-generic/include/api/odp_atomic.h
 +++ b/platform/linux-generic/include/api/odp_atomic.h
 @@ -26,10 +26,6 @@ extern C {
   *  @{
   */

 -/**
 - * Atomic integer
 - */
 -typedef volatile int32_t odp_atomic_int_t;

  /**
   * Atomic unsigned integer 64 bits
 @@ -43,117 +39,6 @@ typedef volatile uint32_t odp_atomic_u32_t;


  /**
 - * Initialize atomic integer
 - *
 - * @param ptrAn integer atomic variable
 - *
 - * @note The operation is not synchronized with other threads
 - */
 -static inline void odp_atomic_init_int(odp_atomic_int_t *ptr)
 -{
 -   *ptr = 0;
 -}
 -
 -/**
 - * Load value of atomic integer
 - *
 - * @param ptrAn atomic variable
 - *
 - * @return atomic integer value
 - *
 - * @note The operation is not synchronized with other threads
 - */
 -static inline int odp_atomic_load_int(odp_atomic_int_t *ptr)
 -{
 -   return *ptr;
 -}
 -
 -/**
 - * Store value to atomic integer
 - *
 - * @param ptrAn atomic variable
 - * @param new_value  Store new_value to a variable
 - *
 - * @note The operation is not synchronized with other threads
 - */
 -static inline void odp_atomic_store_int(odp_atomic_int_t *ptr,
 int new_value)
 -{
 -   *ptr = new_value;
 -}
 -
 -/**
 - * Fetch and add atomic integer
 - *
 - * @param ptrAn atomic variable
 - * @param value  A value to be added to the variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_add_int(odp_atomic_int_t *ptr,
 int value)
 -{
 -   return __sync_fetch_and_add(ptr, value);
 -}
 -
 -/**
 - * Fetch and subtract atomic integer
 - *
 - * @param ptrAn atomic integer variable
 - * @param value  A value to be subtracted from the variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_sub_int(odp_atomic_int_t *ptr,
 int value)
 -{
 -   return __sync_fetch_and_sub(ptr, value);
 -}
 -
 -/**
 - * Fetch and increment atomic integer by 1
 - *
 - * @param ptrAn atomic variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_inc_int(odp_atomic_int_t *ptr)
 -{
 -   return odp_atomic_fetch_add_int(ptr, 1);
 -}
 -
 -/**
 - * Increment atomic integer by 1
 - *
 - * @param ptrAn atomic variable
 - *
 - */
 -static inline void odp_atomic_inc_int(odp_atomic_int_t *ptr)
 -{
 -   odp_atomic_fetch_add_int(ptr, 1);
 -}
 -
 -/**
 - * Fetch and decrement atomic integer by 1
 - *
 - * @param ptrAn atomic int variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int

Re: [lng-odp] [PATCH] Removed odp_atomic_int_t

2014-11-05 Thread Santosh Shukla
On 31 October 2014 19:09, Petri Savolainen petri.savolai...@linaro.org
wrote:

 Integer version is not needed. Unsigned 32 and 64 bit atomics
 are used instead. If signed 32/64 bits can be added later


instead - if signed 32/64 bits required then can be added later on need
basis.


on need basis.

 Signed-off-by: Petri Savolainen petri.savolai...@linaro.org
 ---
  platform/linux-generic/include/api/odp_atomic.h| 115
 -
  platform/linux-generic/include/api/odp_barrier.h   |   4 +-
  .../linux-generic/include/odp_buffer_internal.h|   2 +-
  platform/linux-generic/odp_barrier.c   |   6 +-
  platform/linux-generic/odp_thread.c|   6 +-
  test/api_test/odp_atomic_test.c|  80 ++
  test/api_test/odp_atomic_test.h|   9 --
  7 files changed, 16 insertions(+), 206 deletions(-)

 diff --git a/platform/linux-generic/include/api/odp_atomic.h
 b/platform/linux-generic/include/api/odp_atomic.h
 index 213c81f..5c83b39 100644
 --- a/platform/linux-generic/include/api/odp_atomic.h
 +++ b/platform/linux-generic/include/api/odp_atomic.h
 @@ -26,10 +26,6 @@ extern C {
   *  @{
   */

 -/**
 - * Atomic integer
 - */
 -typedef volatile int32_t odp_atomic_int_t;

  /**
   * Atomic unsigned integer 64 bits
 @@ -43,117 +39,6 @@ typedef volatile uint32_t odp_atomic_u32_t;


  /**
 - * Initialize atomic integer
 - *
 - * @param ptrAn integer atomic variable
 - *
 - * @note The operation is not synchronized with other threads
 - */
 -static inline void odp_atomic_init_int(odp_atomic_int_t *ptr)
 -{
 -   *ptr = 0;
 -}
 -
 -/**
 - * Load value of atomic integer
 - *
 - * @param ptrAn atomic variable
 - *
 - * @return atomic integer value
 - *
 - * @note The operation is not synchronized with other threads
 - */
 -static inline int odp_atomic_load_int(odp_atomic_int_t *ptr)
 -{
 -   return *ptr;
 -}
 -
 -/**
 - * Store value to atomic integer
 - *
 - * @param ptrAn atomic variable
 - * @param new_value  Store new_value to a variable
 - *
 - * @note The operation is not synchronized with other threads
 - */
 -static inline void odp_atomic_store_int(odp_atomic_int_t *ptr, int
 new_value)
 -{
 -   *ptr = new_value;
 -}
 -
 -/**
 - * Fetch and add atomic integer
 - *
 - * @param ptrAn atomic variable
 - * @param value  A value to be added to the variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_add_int(odp_atomic_int_t *ptr, int
 value)
 -{
 -   return __sync_fetch_and_add(ptr, value);
 -}
 -
 -/**
 - * Fetch and subtract atomic integer
 - *
 - * @param ptrAn atomic integer variable
 - * @param value  A value to be subtracted from the variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_sub_int(odp_atomic_int_t *ptr, int
 value)
 -{
 -   return __sync_fetch_and_sub(ptr, value);
 -}
 -
 -/**
 - * Fetch and increment atomic integer by 1
 - *
 - * @param ptrAn atomic variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_inc_int(odp_atomic_int_t *ptr)
 -{
 -   return odp_atomic_fetch_add_int(ptr, 1);
 -}
 -
 -/**
 - * Increment atomic integer by 1
 - *
 - * @param ptrAn atomic variable
 - *
 - */
 -static inline void odp_atomic_inc_int(odp_atomic_int_t *ptr)
 -{
 -   odp_atomic_fetch_add_int(ptr, 1);
 -}
 -
 -/**
 - * Fetch and decrement atomic integer by 1
 - *
 - * @param ptrAn atomic int variable
 - *
 - * @return Value of the variable before the operation
 - */
 -static inline int odp_atomic_fetch_dec_int(odp_atomic_int_t *ptr)
 -{
 -   return odp_atomic_fetch_sub_int(ptr, 1);
 -}
 -
 -/**
 - * Decrement atomic integer by 1
 - *
 - * @param ptrAn atomic variable
 - *
 - */
 -static inline void odp_atomic_dec_int(odp_atomic_int_t *ptr)
 -{
 -   odp_atomic_fetch_sub_int(ptr, 1);
 -}
 -
 -/**
   * Initialize atomic uint32
   *
   * @param ptrAn atomic variable
 diff --git a/platform/linux-generic/include/api/odp_barrier.h
 b/platform/linux-generic/include/api/odp_barrier.h
 index 866648f..fb02a9d 100644
 --- a/platform/linux-generic/include/api/odp_barrier.h
 +++ b/platform/linux-generic/include/api/odp_barrier.h
 @@ -31,8 +31,8 @@ extern C {
   * ODP execution barrier
   */
  typedef struct odp_barrier_t {
 -   int  count;  /** @private Thread count */
 -   odp_atomic_int_t bar;/** @private Barrier counter */
 +   uint32_t count;  /** @private Thread count */
 +   odp_atomic_u32_t bar;/** @private Barrier counter */
  } odp_barrier_t;


 diff --git a/platform/linux-generic/include/odp_buffer_internal.h
 b/platform/linux-generic/include/odp_buffer_internal.h
 index 2002b51..0027bfc 100644
 --- a/platform/linux-generic/include/odp_buffer_internal.h
 +++ b/platform/linux-generic/include/odp_buffer_internal.h
 @@ -88,7 +88,7 @@ typedef 

[lng-odp] [PATCH] Removed odp_atomic_int_t

2014-10-31 Thread Petri Savolainen
Integer version is not needed. Unsigned 32 and 64 bit atomics
are used instead. If signed 32/64 bits can be added later
on need basis.

Signed-off-by: Petri Savolainen petri.savolai...@linaro.org
---
 platform/linux-generic/include/api/odp_atomic.h| 115 -
 platform/linux-generic/include/api/odp_barrier.h   |   4 +-
 .../linux-generic/include/odp_buffer_internal.h|   2 +-
 platform/linux-generic/odp_barrier.c   |   6 +-
 platform/linux-generic/odp_thread.c|   6 +-
 test/api_test/odp_atomic_test.c|  80 ++
 test/api_test/odp_atomic_test.h|   9 --
 7 files changed, 16 insertions(+), 206 deletions(-)

diff --git a/platform/linux-generic/include/api/odp_atomic.h 
b/platform/linux-generic/include/api/odp_atomic.h
index 213c81f..5c83b39 100644
--- a/platform/linux-generic/include/api/odp_atomic.h
+++ b/platform/linux-generic/include/api/odp_atomic.h
@@ -26,10 +26,6 @@ extern C {
  *  @{
  */
 
-/**
- * Atomic integer
- */
-typedef volatile int32_t odp_atomic_int_t;
 
 /**
  * Atomic unsigned integer 64 bits
@@ -43,117 +39,6 @@ typedef volatile uint32_t odp_atomic_u32_t;
 
 
 /**
- * Initialize atomic integer
- *
- * @param ptrAn integer atomic variable
- *
- * @note The operation is not synchronized with other threads
- */
-static inline void odp_atomic_init_int(odp_atomic_int_t *ptr)
-{
-   *ptr = 0;
-}
-
-/**
- * Load value of atomic integer
- *
- * @param ptrAn atomic variable
- *
- * @return atomic integer value
- *
- * @note The operation is not synchronized with other threads
- */
-static inline int odp_atomic_load_int(odp_atomic_int_t *ptr)
-{
-   return *ptr;
-}
-
-/**
- * Store value to atomic integer
- *
- * @param ptrAn atomic variable
- * @param new_value  Store new_value to a variable
- *
- * @note The operation is not synchronized with other threads
- */
-static inline void odp_atomic_store_int(odp_atomic_int_t *ptr, int new_value)
-{
-   *ptr = new_value;
-}
-
-/**
- * Fetch and add atomic integer
- *
- * @param ptrAn atomic variable
- * @param value  A value to be added to the variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_add_int(odp_atomic_int_t *ptr, int value)
-{
-   return __sync_fetch_and_add(ptr, value);
-}
-
-/**
- * Fetch and subtract atomic integer
- *
- * @param ptrAn atomic integer variable
- * @param value  A value to be subtracted from the variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_sub_int(odp_atomic_int_t *ptr, int value)
-{
-   return __sync_fetch_and_sub(ptr, value);
-}
-
-/**
- * Fetch and increment atomic integer by 1
- *
- * @param ptrAn atomic variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_inc_int(odp_atomic_int_t *ptr)
-{
-   return odp_atomic_fetch_add_int(ptr, 1);
-}
-
-/**
- * Increment atomic integer by 1
- *
- * @param ptrAn atomic variable
- *
- */
-static inline void odp_atomic_inc_int(odp_atomic_int_t *ptr)
-{
-   odp_atomic_fetch_add_int(ptr, 1);
-}
-
-/**
- * Fetch and decrement atomic integer by 1
- *
- * @param ptrAn atomic int variable
- *
- * @return Value of the variable before the operation
- */
-static inline int odp_atomic_fetch_dec_int(odp_atomic_int_t *ptr)
-{
-   return odp_atomic_fetch_sub_int(ptr, 1);
-}
-
-/**
- * Decrement atomic integer by 1
- *
- * @param ptrAn atomic variable
- *
- */
-static inline void odp_atomic_dec_int(odp_atomic_int_t *ptr)
-{
-   odp_atomic_fetch_sub_int(ptr, 1);
-}
-
-/**
  * Initialize atomic uint32
  *
  * @param ptrAn atomic variable
diff --git a/platform/linux-generic/include/api/odp_barrier.h 
b/platform/linux-generic/include/api/odp_barrier.h
index 866648f..fb02a9d 100644
--- a/platform/linux-generic/include/api/odp_barrier.h
+++ b/platform/linux-generic/include/api/odp_barrier.h
@@ -31,8 +31,8 @@ extern C {
  * ODP execution barrier
  */
 typedef struct odp_barrier_t {
-   int  count;  /** @private Thread count */
-   odp_atomic_int_t bar;/** @private Barrier counter */
+   uint32_t count;  /** @private Thread count */
+   odp_atomic_u32_t bar;/** @private Barrier counter */
 } odp_barrier_t;
 
 
diff --git a/platform/linux-generic/include/odp_buffer_internal.h 
b/platform/linux-generic/include/odp_buffer_internal.h
index 2002b51..0027bfc 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -88,7 +88,7 @@ typedef struct odp_buffer_hdr_t {
uint32_t index;  /* buf index in the pool */
size_t   size;   /* max data size */
size_t   cur_offset; /* current offset */
-   odp_atomic_int_t ref_count;  /* reference count */
+   odp_atomic_u32_t