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

Feng, Boqun boqun.feng at intel.com
Wed Apr 17 00:39:19 PDT 2013


hi guanqun,
  How did you configure to use clang, and is every part using clang to
compile. I use "cmake -DCMAKE_C_COMPILER -DCMAKE_CXX_COMPILER" to
configure, and I got a lot of warnings. And besides, in
backend/CMakeList.txt there are some code dealing with compiler
configurations. So I think if we are going to support clang, maybe a
little more work is needed.

  BTW, I've applied this patchset and all utest cases are OK.

Thx,
Boqun

On Wed, Apr 17, 2013 at 05:27:28AM +0000, Lu, Guanqun wrote:
> hi Zhigang,
> 
> Yes, these patchset are for clang build. With these applied, I can compiled it with clang succesfully and the utest_run runs OK with problems.
> 
> 
> > -----Original Message-----
> > From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com]
> > Sent: Tuesday, April 16, 2013 2:20 PM
> > To: Lu, Guanqun
> > Cc: beignet at lists.freedesktop.org
> > Subject: Re: [Beignet] [PATCH 1/5] remove dollar sign in identifier
> > 
> > Guanqun,
> > 
> > Is this patchset all for build with clang? If it is, what's the status after this
> > patchset applied?
> > 
> > On Tue, Apr 16, 2013 at 02:38:45PM +0800, Lu Guanqun wrote:
> > > 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
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list