Bug 1118698 - Add namespace for automic functions to prevent redefine error. r=ajones a=mse
authorEthan Lin <etlin@mozilla.com>
Wed, 07 Jan 2015 03:41:00 -0500
changeset 242775 aa13772c45f64b200b7367d49a943d708986047b
parent 242774 3adeb981ced70b669d61e97321ccba83210ed988
child 242776 0300bc3a8ad622ce2bba1770f92826ce7f80d6c8
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones, mse
bugs1118698
milestone36.0a2
Bug 1118698 - Add namespace for automic functions to prevent redefine error. r=ajones a=mse
media/libstagefright/stubs/include/cutils/atomic.h
--- a/media/libstagefright/stubs/include/cutils/atomic.h
+++ b/media/libstagefright/stubs/include/cutils/atomic.h
@@ -5,16 +5,17 @@
 #define ATOMIC_H_
 
 #include <stdint.h>
 
 // This implements the atomic primatives without any atomicity guarantees. This
 // makes the totally unsafe. However we're only using the demuxer in a single
 // thread.
 
+namespace stagefright {
 static inline int32_t
 android_atomic_dec(volatile int32_t* aValue)
 {
   return (*aValue)--;
 }
 
 static inline int32_t
 android_atomic_inc(volatile int32_t* aValue)
@@ -42,10 +43,11 @@ static inline int32_t
 android_atomic_cmpxchg(int32_t aOld, int32_t aNew, volatile int32_t* aValue)
 {
   if (*aValue == aOld)
   {
     return *aValue = aNew;
   }
   return aOld;
 }
+}
 
 #endif