[cairo] Atomic reference counting

Chris Wilson chris at chris-wilson.co.uk
Sun Sep 23 14:10:03 PDT 2007

Behdad Esfahbod (behdad at behdad.org) said: 
> My main comment is that lets put the infrastructure for adding other
> implementations in place, so we don't have to go on and clean this up
> later on like we had to do for mutex stuff.

I've followed your suggestions and introduced an opaque
cairo_reference_count_t layered over a set of atomic ops that leaves
room for adding different implementations.

The first patch is a work-around for adding cairo_private to a header
that gets pulled into cairo-boilerplate.

The second patch adds the atomic ops interface, starting with an
implementation for the Intel __sync_* primitives.

The third patch adds the cairo_reference_count_t and updates all

Comments welcome.
Chris Wilson

More information about the cairo mailing list