Review Request: Add spinlocks lock type, based on GCC intrisincs

Vadim Zhukov persgray at gmail.com
Tue Aug 28 21:36:07 BST 2012


2012/8/28 Thiago Macieira <thiago at kde.org>:
> On terça-feira, 28 de agosto de 2012 12.28.24, Vadim Zhukov wrote:
>> See the definition of SharedLock structure in kshareddatacache_p.h.
>> Actually, other union members will not be accessed simultaneously with
>> spinlock, but compiler doesn't know about that.
>
> I don't see the need for a union.
>
> The other types aren't related to a spinlock.

The main thing there is "char unused[64]" below. The union is needed
to keep the size of the whole structure constant. Or... is it
impossible that there will be run two KDE-based apps with size of Qt
atomic type simultaneously; e.g. during OS update?

--
  WBR,
  Vadim Zhukov




More information about the kde-core-devel mailing list