Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously cairo-mutex-list-private.h assumed that every use of the file
will produce a statement for each mutex by including a semicolon after
each. But some uses (like enumerating all static mutexes in an array
for example, can't be implemented with the semicolon in place. So, move
the semicolon out to the users of the header file.
|
|
Essentially renaming cairo-mutex-type-private.h to cairo-mutex-impl-private.h
and changing all its namespace from cairo_mutex to cairo_mutex_impl.
cairo-mutex-type-private.h then does all the sanity checks on the
implementation that used to be in cairo-mutex-private.h. Plus, defines macros
for the cairo-mutex namespace to map to the cairo-mutex-impl namespace. This
extra mapping layer allows for add debugging facilities.
|
|
|
|
implementation
to make them better match the design I have in mind, that I will
document in a minute. They are a lot more readable and understandable
now.
|
|
Previously cairo-mutex.c was abusing cairo-mutex-private.h by
defining CAIRO_MUTEX_DECLARE before including it, and
cairo-mutex-private.h was simply not overriding any available
CAIRO_MUTEX_DECLARE. This is not the way it should be.
cairo-mutex.c should instead define CAIRO_MUTEX_DECLARE and
include cairo-mutex-list-private.h for itself.
|
|
This is more consistent with CAIRO_MUTEX_LOCK/UNLOCK.
|
|
|
|
We use the generic initialization if CAIRO_MUTEX_INITIALIZE is not
defined.
|
|
This is a list header file. We should not prevent it from multiple
inclusions.
|
|
sentinal before explicitly including the mutex list.
|
|
|
|
|
|
Also add it (and cairo-mutex-private.h) to Makefile.am
where they should have been.
|
|
|
|
All mutex declarations have been moved to cairo-mutex-list.h.
This should avoid breaking of less frequently tested backends,
when mutexes are introduced or when existing mutexes are renamed.
Instead of initializing mutexes on library startup, mutexes are
lazily initialized within the few entry points of now by calling
CAIRO_MUTEX_INITIALIZE(). Currently only the OS/2 backend takes
care about releasing global mutexes. Therefore there is no counter
part of that macro for finalizing all global mutexes yet - but
as cairo-backend-os2.c shows such a function would be quite
easy to implement.
|