Commit graph

13 commits

Author SHA1 Message Date
Behdad Esfahbod
e5d9d51e55 [cairo-mutex] Fix typo. 2007-05-03 19:04:21 -04:00
Behdad Esfahbod
06cc74d974 [cairo-mutex] Rewrite defaults for CAIRO_MUTEX macros not defined by the 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 19:45:29 -04:00
Behdad Esfahbod
e87a25dc7c [cairo-mutex] Fix usage of CAIRO_MUTEX_DECLARE()
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 19:24:26 -04:00
Behdad Esfahbod
b0a0a1779d [cairo-mutex] Make CAIRO_MUTEX_INIT/FINI take mutex object, not pointer to it
This is more consistent with CAIRO_MUTEX_LOCK/UNLOCK.
2007-05-01 19:20:05 -04:00
Behdad Esfahbod
a8d47d0c00 [cairo-mutex] Rename macro arguments from "name" to "mutex" 2007-05-01 19:20:05 -04:00
Behdad Esfahbod
f771b9157c [cairo-mutex] Define and use CAIRO_MUTEX_USE_GENERIC_INITIALIZATION
We use the generic initialization if CAIRO_MUTEX_INITIALIZE is not
defined.
2007-04-19 16:21:13 -04:00
Behdad Esfahbod
47be7280bf [cairo-mutex] Remove multiple-inclusion guards from cairo-mutex-list-private.h
This is a list header file.  We should not prevent it from multiple
inclusions.
2007-04-19 16:07:15 -04:00
Mathias Hasselmann
cc8841645c Properly use CAIRO_MUTEX_{INIT,FINI} and remove CAIRO_MUTEX_LIST_PRIVATE_H sentinal before explicitly including the mutex list. 2007-04-19 13:47:45 +02:00
Mathias Hasselmann
9b348929b5 Introduce CAIRO_MUTEX_FINALIZE as counter-part for CAIRO_MUTEX_INITIALIZE 2007-04-19 13:38:26 +02:00
Mathias Hasselmann
67767afa09 Update _cairo_mutex_initialized during initialization. 2007-04-19 13:38:25 +02:00
Carl Worth
ae80d375f8 Rename cairo-mutex-list.h to cairo-mutex-list-private.h
Also add it (and cairo-mutex-private.h) to Makefile.am
where they should have been.
2007-04-12 13:22:36 -07:00
Mathias Hasselmann
c4bd7cf6f8 Move declaration of cairo_mutex_t to cairo-mutex-private.h 2007-03-20 13:32:33 +01:00
Mathias Hasselmann
be52178443 Initialize mutexes at central location.
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.
2007-03-20 10:11:14 +01:00