[cairo] New per-scaled_font mutex to fix locking bugs
Vladimir Vukicevic
vladimir at pobox.com
Tue Feb 6 17:09:48 PST 2007
Carl Worth wrote:
> For win32, I took a guess and came up with the following
>
> typedef CRITICAL_SECTION cairo_mutex_t;
> # define CAIRO_MUTEX_INIT(mutex) InitializeCriticalSection (mutex)
> # define CAIRO_MUTEX_FINI(mutex) DeleteCriticalSection (mutex)
These should both be &mutex (the address of the object)
> # define CAIRO_MUTEX_NIL_INITIALIZER {}
>
> The only thing I'm unsure of there is the NIL_INITIALIZER. This is
> only used when initializing the mutex for a nil surface, so the value
> won't ever be looked at, but it does need to compile at least.
Bill pointed out the problems with this; from looking at the windows
headers, I /think/ { 0 } should work. I can't try it at the moment
though, but I'll give it a shot later.
- Vlad
More information about the cairo
mailing list