[cairo] Atomic reference counting

Behdad Esfahbod behdad at behdad.org
Sun Sep 23 20:15:36 PDT 2007


On Sun, 2007-09-23 at 22:10 +0100, Chris Wilson wrote:
> 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
> users.

Forgot to attach?

> Comments welcome.
> --
> Chris Wilson
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list