[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: Add spinlocks lock type, based on GCC intrisincs
From:       Thiago Macieira <thiago () kde ! org>
Date:       2012-08-27 22:41:16
Message-ID: 3400720.Vpom6k0NaP () tjmaciei-mobl2
[Download RAW message or body]


On segunda-feira, 27 de agosto de 2012 18.20.15, Michael Pyne wrote:
> > Please use the Qt atomic types. Until GCC 4.7, they generate better code.
> 
> I agree, the reason it wasn't that way initially is mentioned in the 
> discussion on the bug (but basically because you can't simply put 
> QBasicAtomicInt in the union used to store the different lock types that
> are  possible).

Why not?

QBasicAtomicInt are permitted in unions. Besides, why do you want it in a 
union in the first place? You should not access the data that it holds *except* 
via the QBasicAtomicInt functions.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic