[Development] QBasicMutex::lockInternal() race condition?

Tony Van Eerd tvaneerd at rim.com
Fri Sep 21 15:42:13 CEST 2012



> -----Original Message-----
> 
> Not really, the id can't change.
> The id is only set once when the QMutexPrivate is used for the first
> time.
> (And that change has already been aquired for a long time)
> 
> Acquire is uneccessary.
> 
> It was added in commit 5bfeab87 when the uses of the operator were
> removed. I
> guess a lot of the barers where added for safety, because it would have
> been
> too much work to look in so many place which one were necessary.
> 
> --
> Olivier
> 

And removing barriers is always scary.

By the way, I assume the intent is to limit the implementation to only using int/pointer-sized atomics, not double width atomics?



---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.



More information about the Development mailing list