diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-04 22:19:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-05 07:32:44 +0100 |
commit | 9d7a7e76b8bccc2517950976bb8557cd7b955a11 (patch) | |
tree | d76d708c093c06ee18475e351f8fd8685ce0369c /src/cairo-scaled-font-private.h | |
parent | f4d9a4482fa1bfa37783ca139e3716c8d8649f32 (diff) | |
download | cairo-9d7a7e76b8bccc2517950976bb8557cd7b955a11.tar.gz |
[scaled-font] Close race from 16d128
Whilst waiting for the fontmap lock on destruction another thread may not
only have resurrected the font but also destroyed it acquired the lock
first and inserted into the holdovers before the first thread resumes. So
check that the font is not already in the holdovers array before
inserting.
Diffstat (limited to 'src/cairo-scaled-font-private.h')
-rw-r--r-- | src/cairo-scaled-font-private.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-scaled-font-private.h b/src/cairo-scaled-font-private.h index f6c97488c..dc16ea871 100644 --- a/src/cairo-scaled-font-private.h +++ b/src/cairo-scaled-font-private.h @@ -92,9 +92,9 @@ struct _cairo_scaled_font { cairo_matrix_t ctm; /* user space => device space */ cairo_font_options_t options; - cairo_bool_t placeholder; /* protected by fontmap mutex */ - - cairo_bool_t finished; + unsigned int placeholder : 1; /* protected by fontmap mutex */ + unsigned int holdover : 1; + unsigned int finished : 1; /* "live" scaled_font members */ cairo_matrix_t scale; /* font space => device space */ |