[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:       Vadim Zhukov <persgray () gmail ! com>
Date:       2012-08-28 20:36:07
Message-ID: CAMy=nGE18Yaqr9icq7-oDnpC+5M9dgWHy_Fgipsw+70QWiM8eQ () mail ! gmail ! com
[Download RAW message or body]

2012/8/28 Thiago Macieira <thiago@kde.org>:
> On ter=C3=A7a-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
[prev in list] [next in list] [prev in thread] [next in thread] 

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