This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: debug mode performance patch


On 10 November 2010 22:02, Jonathan Wakely wrote:
>
> e.g. this fixes both deadlocks
>
> void swap(A& a, A& b)
> {
> ?std::mutex& m1 = get_mutex(&a);
> ?std::mutex& m2 = get_mutex(&b);
> ?if (&m1 < &m2)

Doh, that should be &m1 == &m2, sorry.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]