summaryrefslogtreecommitdiff
path: root/src/cairo-mutex.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-19[cairo-mutex] Move semicolons out of cairo-mutex-list-private.hBehdad Esfahbod1-3/+3
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.
2008-05-27[cairo-mutex] Prepare mutex infrastructure for adding mutex debugging facilitiesBehdad Esfahbod1-8/+10
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.
2007-05-03[cairo-mutex] Fix typo.Behdad Esfahbod1-4/+4
2007-05-01[cairo-mutex] Rewrite defaults for CAIRO_MUTEX macros not defined by the ↵Behdad Esfahbod1-3/+15
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.
2007-05-01[cairo-mutex] Fix usage of CAIRO_MUTEX_DECLARE()Behdad Esfahbod1-4/+5
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.
2007-05-01[cairo-mutex] Make CAIRO_MUTEX_INIT/FINI take mutex object, not pointer to itBehdad Esfahbod1-2/+2
This is more consistent with CAIRO_MUTEX_LOCK/UNLOCK.
2007-05-01[cairo-mutex] Rename macro arguments from "name" to "mutex"Behdad Esfahbod1-2/+2
2007-04-19[cairo-mutex] Define and use CAIRO_MUTEX_USE_GENERIC_INITIALIZATIONBehdad Esfahbod1-1/+1
We use the generic initialization if CAIRO_MUTEX_INITIALIZE is not defined.
2007-04-19[cairo-mutex] Remove multiple-inclusion guards from cairo-mutex-list-private.hBehdad Esfahbod1-2/+0
This is a list header file. We should not prevent it from multiple inclusions.
2007-04-19Properly use CAIRO_MUTEX_{INIT,FINI} and remove CAIRO_MUTEX_LIST_PRIVATE_H ↵Mathias Hasselmann1-4/+6
sentinal before explicitly including the mutex list.
2007-04-19Introduce CAIRO_MUTEX_FINALIZE as counter-part for CAIRO_MUTEX_INITIALIZEMathias Hasselmann1-0/+12
2007-04-19Update _cairo_mutex_initialized during initialization.Mathias Hasselmann1-0/+2
2007-04-12Rename cairo-mutex-list.h to cairo-mutex-list-private.hCarl Worth1-1/+1
Also add it (and cairo-mutex-private.h) to Makefile.am where they should have been.
2007-03-20Move declaration of cairo_mutex_t to cairo-mutex-private.hMathias Hasselmann1-2/+4
2007-03-20Initialize mutexes at central location.Mathias Hasselmann1-0/+51
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.