[Pixman] Valgrind-clean pixman

Benjamin Otte otte at redhat.com
Sat Aug 28 08:45:46 PDT 2010

On Sat, 2010-08-28 at 18:34 +0300, Siarhei Siamashka wrote:
> I may be wrong here, but seems like everyone has his own definition of what is 
> considered to be "thread safe". Currently pixman appears to be thread safe as 
> long as same pixman objects (pixman_image_t and the others) are not used from 
> multiple threads simultaneously. This is somewhat similar to the thread safety 
> assumptions of the GNU implementation of a standard C++ template library. I'm 
> adding this link here because they took care of documenting what can be 
> guaranteed when working in a multi-threaded environment, and what can't be:
> http://gcc.gnu.org/onlinedocs/libstdc++/manual/using_concurrency.html#manual.intro.using.concurrency.thread_safety
> http://www.sgi.com/tech/stl/thread_safety.html
Afaik everything we need is the ability to safely add/remove references
to pixman images from multiple threads at the same time. So the only
thing we need is atomic operations.

Unfortunately, those usually require a fallback implementation that uses
mutexes, because there's no portable atomic ops implementation in
existance. So once you implement atomic ops, you need mutexes.


More information about the Pixman mailing list