summaryrefslogtreecommitdiff
path: root/src/cairo-mutex-private.h
AgeCommit message (Collapse)AuthorFilesLines
2008-09-19[cairo-mutex] Move semicolons out of cairo-mutex-list-private.hBehdad Esfahbod1-1/+1
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-09-19Make sure (and check) that all private headers include some cairo header firstBehdad Esfahbod1-4/+0
The macros CAIRO_BEGIN_DECLS and CAIRO_END_DECLS are declared in two places: config.h and cairo.h. On Win32 build there is no config.h. So, we can't rely on pulling CAIRO_BEGIN_DECLS from there. Hence, we now: * Not add those declarations to config.h anymore, * Test that every cairo private header includes some other cairo header before any other includes. These two are fairly enough to ensure that cairo.h is seen from all private headers. There's still the case of headers not including any header file at all. I'll fix that later.
2008-09-02Revamp the build system.Behdad Esfahbod1-0/+4
Quick summary of changes: - Move list of cairo source files out of src/Makefile.am and into src/Sources.mk, - Generate files src/Config.mk and src/Config.mk.win32 that choose the right set of source files and headers based on configured backends and features. This drastically simplifies building using other build systems. The src/Makefile.win32 file needs to be updated to reflect these changes. - Add README files to various directories, - Add toplevel HACKING file.
2008-05-27[cairo-mutex] Prepare mutex infrastructure for adding mutex debugging facilitiesBehdad Esfahbod1-119/+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.
2008-01-28[doc] Make sure all macro names in docs are prefixed by %Behdad Esfahbod1-2/+2
2007-09-25Move GCC attributes wrapping into a separate header.Chris Wilson1-0/+1
The wrapping of GCC attributes (such as cairo_private) needs to be visible to any header file, including those that avoid cairoint.h such as cairo-boilerplate. To achieve this we move the pre-processor magic to its own header file and include it as required.
2007-08-23Remove include of cairoint.h from *-private.h header files.Carl Worth1-1/+3
These were recently added, (as part of sparse integration?), but they break boilerplate which reaches into at least cairo-types-private.h and cairo-scaled-font-private.h. But boilerplate cannot see cairoint.h or else it gets the internal sybol renaming, (with the INT_ prefix), and then all the test suite tests refuse to link. If this change reverts some recently-added functionality, (or cleanliness), then we'll just need to find some other way to add that back again without the breakage.
2007-08-22[Makefile.am] Add target sparse to run sparse static source code analyzerBehdad Esfahbod1-3/+1
There are still some bits not quite working.
2007-05-01[cairo-mutex] Rewrite defaults for CAIRO_MUTEX macros not defined by the ↵Behdad Esfahbod1-26/+67
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-3/+1
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 sure mutex implementation declares enough macrosBehdad Esfahbod1-0/+11
We have defaults for the rest.
2007-05-01[cairo-mutex] Make CAIRO_MUTEX_INIT/FINI take mutex object, not pointer to itBehdad Esfahbod1-1/+1
This is more consistent with CAIRO_MUTEX_LOCK/UNLOCK.
2007-05-01[cairo-mutex] Make sure CAIRO_MUTEX_FINI() evaluates its argument onceBehdad Esfahbod1-1/+1
2007-05-01[cairo-mutex] Rename macro arguments from "name" to "mutex"Behdad Esfahbod1-3/+3
2007-05-01[cairo-mutex-private.h] Move implementation-specific parts to ↵Behdad Esfahbod1-79/+2
cairo-mutex-type-private.h This fixes the problem reported by Dave Yeo that boilerplate wasn't building: In file included from ../src/cairo-scaled-font-private.h:44, from cairo-boilerplate.c:65: ../src/cairo-mutex-private.h:183: error: syntax error before "extern" ../src/cairo-mutex-private.h:184: error: syntax error before "void" ../src/cairo-mutex-private.h:185: error: syntax error before "void" make[3]: *** [cairo-boilerplate.lo] Error 1
2007-04-30[cairo-mutex] Fix CAIRO_MUTEX_FINALIZE definition to take paranthesesBehdad Esfahbod1-1/+1
This was breaking build on some systems as reported by Adrian Johnson on the list.
2007-04-30Fix cygwin compile errorAdrian Johnson1-12/+0
The WINVER macros need to be defined before including <windows.h>. As a result of some recent include file rearranging, <windows.h> was included indirectly before WINVER was defined.
2007-04-22[cairo-mutex] Add a poor man's mutex implementation in case of CAIRO_NO_MUTEXBehdad Esfahbod1-5/+8
just for fun.
2007-04-22[BeOS] Add mutex implementationBehdad Esfahbod1-11/+6
2007-04-22[cairo-mutex] Properly paranthesize macro argumentsBehdad Esfahbod1-6/+6
2007-04-20Fix build break related to mutexes on OS/2Peter Weilbacher1-1/+1
cairo_mutex_t is HTMX which is ULONG on OS/2, so we have to set the mutex itself to 0 and not the address...
2007-04-19[cairo-mutex] If no mutex implementation is found, should #error instead of ↵Behdad Esfahbod1-2/+2
#warning otherwise we will cause compile errors before the sanity check macros get a chance to err.
2007-04-19[cairo-mutex] Switch to HAVE_WINDOWS_H to use Win32 mutexesBehdad Esfahbod1-1/+1
2007-04-19[cairo-commit] Update attribution headers in cairo-mutex-private.hBehdad Esfahbod1-1/+2
2007-04-19[cairo-mutex] Warn if no mutex definition found and let sanity macros errBehdad Esfahbod1-3/+5
about undefined CAIRO_MUTEX macros.
2007-04-19[cairo-mutex] Support non-reentrant compilation if CAIRO_NO_MUTEX definedBehdad Esfahbod1-1/+9
to 1.
2007-04-19[cairo-commit] Just warn for BeOS and let the sanity check macros errBehdad Esfahbod1-7/+3
about undefined CAIRO_MUTEX macros.
2007-04-19[cairo-mutex] Prefer "#if CAIRO_SOMETHING" over "#if defined CAIRO_SOMETHING"Behdad Esfahbod1-2/+2
2007-04-19[cairo-mutex] Add default implementation for CAIRO_MUTEX_INITBehdad Esfahbod1-4/+7
that uses CAIRO_MUTEX_NIL_INITIALIZER. This used to be the implementation for pthread because pthread_mutex_init() is broken. See d48bb4fbe876a93199ba48fcf5f32734fbe18ba9.
2007-04-19[cairo-mutex] Add default no-op implementation for CAIRO_MUTEX_FINIBehdad Esfahbod1-0/+6
2007-04-19[cairo-mutex] Use CAIRO_MUTEX_NOOP when applicableBehdad Esfahbod1-1/+1
2007-04-19[cairo-mutex] Err if at least one of mutex macros are not definedBehdad Esfahbod1-0/+23
2007-04-19[cairo-mutex] Define and use CAIRO_MUTEX_USE_GENERIC_INITIALIZATIONBehdad Esfahbod1-0/+9
We use the generic initialization if CAIRO_MUTEX_INITIALIZE is not defined.
2007-04-19[cairo-mutex] Define CAIRO_MUTEX_NOOPBehdad Esfahbod1-0/+6
2007-04-19[cairo-mutex] Inlucde cairo-features.h and config.hBehdad Esfahbod1-0/+6
Previously we were lucky enough to have them included before us
2007-04-19[cairo-mutex] Remove unneeded #undef CAIRO_MUTEX_EXTERNALBehdad Esfahbod1-8/+0
2007-04-19Introduce CAIRO_MUTEX_FINALIZE as counter-part for CAIRO_MUTEX_INITIALIZEMathias Hasselmann1-1/+7
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-9/+44
2007-03-20Initialize mutexes at central location.Mathias Hasselmann1-0/+123
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.