e the easiest way out."
-Original Message-
From: David Faure [mailto:fa...@kde.org]
Sent: Thursday, May 16, 2013 2:34 PM
To: valgrind-users@lists.sourceforge.net
Cc: Phil Longstaff
Subject: Re: [Valgrind-users] Helgrind data race question
On Tuesday 14 May 2013 20:18:44 Phil Longs
On Tuesday 14 May 2013 20:18:44 Phil Longstaff wrote:
> int* my_ptr = new int;
> *my_ptr = 10;
> pthread_mutex_lock(&lock);
> shared_ptr = my_ptr;
> pthread_mutex_unlock(&lock);
>
> Thread 2:
> pthread_mutex_lock(&lock);
> int* my_ptr = shared_ptr;
> pthread_mutex_unlock(&lock);
> ... = *my_ptr;