Bug 1118698 - Add namespace for automic functions to prevent redefine error. r=ajones
authorEthan Lin <etlin@mozilla.com>
Wed, 07 Jan 2015 03:41:00 -0500
changeset 248491 ec211f0ef71a2e507352125639e5cd641cfa508a
parent 248490 639cceebc33de0600942579d6d275c81671782fc
child 248492 fa7a1beefeb991bd2bdaf4207963486e58bfff95
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones
bugs1118698
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1118698 - Add namespace for automic functions to prevent redefine error. r=ajones
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