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

Tony Van Eerd tvaneerd at rim.com
Fri Sep 21 19:45:27 CEST 2012


I have no solutions (yet?).  I just want to know how to constrain my thinking.  I basically won't even try going down the DCAS road.
Nor the LL/SC road, since C++11 has basically shunned that idea, sadly.

Solutions that map to C++11 concepts, with single-sized atomics, would probably be best.  Like what is there now. 

> -----Original Message-----
> From: development-bounces+tvaneerd=rim.com at qt-project.org
> [mailto:development-bounces+tvaneerd=rim.com at qt-project.org] On Behalf
> Of Thiago Macieira
> Sent: Friday, September 21, 2012 1:32 PM
> To: development at qt-project.org
> Subject: Re: [Development] QBasicMutex::lockInternal() race condition?
> 
> On sexta-feira, 21 de setembro de 2012 16.46.44, Tony Van Eerd wrote:
> > I'll take that as a 'No'.  ie use of DCAS would be limited to the
> point of
> > it not being worth maintaining 2 separate implementations - one with
> DCAS,
> > one without.  I think DCAS is only worth using if it could be used
> > everywhere.
> 
> Right. Because of the silly x86-64 early mistake, we need to support a
> non-
> DCAS version. Or ban those early processors without "cx16" support.
> 
> Even then, we need a separate implementation for LL/SC architectures.
> 
> We don't need to decide on that now. But if you do have a good solution
> with
> DCAS, we could consider it later. We just need to double the size of
> QMutex
> now.
> 
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>      Intel Sweden AB - Registration Number: 556189-6027
>      Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

---------------------------------------------------------------------
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