[Beignet] [PATCH 1/5] remove dollar sign in identifier

Xing, Homer homer.xing at intel.com
Mon Apr 15 22:59:48 PDT 2013


Interesting ...  Why did the code have dollar sign inside ? What was the dollar sign used for ?

-----Original Message-----
From: beignet-bounces+homer.xing=intel.com at lists.freedesktop.org [mailto:beignet-bounces+homer.xing=intel.com at lists.freedesktop.org] On Behalf Of Lu Guanqun
Sent: Tuesday, April 16, 2013 2:39 PM
To: Lu, Guanqun; beignet at lists.freedesktop.org
Subject: [Beignet] [PATCH 1/5] remove dollar sign in identifier

Therefore it removes compiler warnings.

Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
---
 backend/src/sys/mutex.hpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/backend/src/sys/mutex.hpp b/backend/src/sys/mutex.hpp index c8e3f2f..1a462b0 100644
--- a/backend/src/sys/mutex.hpp
+++ b/backend/src/sys/mutex.hpp
@@ -42,17 +42,17 @@ namespace gbe
   /*! active mutex */
   class MutexActive {
   public:
-    INLINE MutexActive(void) : $lock(LOCK_IS_FREE) {}
+    INLINE MutexActive(void) : _lock(LOCK_IS_FREE) {}
     INLINE void lock(void) {
       GBE_COMPILER_READ_BARRIER;
-      while (cmpxchg($lock, LOCK_IS_TAKEN, LOCK_IS_FREE) != LOCK_IS_FREE)
+      while (cmpxchg(_lock, LOCK_IS_TAKEN, LOCK_IS_FREE) != 
+ LOCK_IS_FREE)
         _mm_pause();
       GBE_COMPILER_READ_BARRIER;
     }
-    INLINE void unlock(void) { $lock.storeRelease(LOCK_IS_FREE); }
+    INLINE void unlock(void) { _lock.storeRelease(LOCK_IS_FREE); }
   protected:
-    enum ${ LOCK_IS_FREE = 0, LOCK_IS_TAKEN = 1 };
-    Atomic $lock;
+    enum { LOCK_IS_FREE = 0, LOCK_IS_TAKEN = 1 };
+    Atomic _lock;
     MutexActive(const MutexActive&); // don't implement
     MutexActive& operator=(const MutexActive&); // don't implement
     GBE_CLASS(MutexActive);

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list