diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-05-09 09:53:40 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-05-09 15:54:04 +0200 |
commit | 5f633580189fa48f5b650d3c63c585521bb833a9 (patch) | |
tree | fd74ca15704156e9c62a881af7ffc67c3400bebd /src/cairo-mutex-type-private.h | |
parent | 7dce5360424a98e4100bd78e768c220959633145 (diff) | |
download | cairo-5f633580189fa48f5b650d3c63c585521bb833a9.tar.gz |
[src/check-doc-syntax.sh] Fix some bugs in the check and fix errors found
Diffstat (limited to 'src/cairo-mutex-type-private.h')
-rw-r--r-- | src/cairo-mutex-type-private.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/cairo-mutex-type-private.h b/src/cairo-mutex-type-private.h index 1a29dcbf3..f68afb77f 100644 --- a/src/cairo-mutex-type-private.h +++ b/src/cairo-mutex-type-private.h @@ -72,7 +72,9 @@ CAIRO_BEGIN_DECLS * You should be able to compile the following snippet (don't try * running it): * + * <programlisting> * cairo_mutex_t _cairo_some_mutex; + * </programlisting> * * - #define CAIRO_MUTEX_LOCK(mutex) and CAIRO_MUTEX_UNLOCK(mutex) to * proper statement to lock/unlock the mutex object passed in. @@ -82,44 +84,52 @@ CAIRO_BEGIN_DECLS * No trailing semicolons are needed (in any macro you define here). * You should be able to compile the following snippet: * + * <programlisting> * cairo_mutex_t _cairo_some_mutex; * * if (1) - * %CAIRO_MUTEX_LOCK (_cairo_some_mutex); + * CAIRO_MUTEX_LOCK (_cairo_some_mutex); * else - * %CAIRO_MUTEX_UNLOCK (_cairo_some_mutex); + * CAIRO_MUTEX_UNLOCK (_cairo_some_mutex); + * </programlisting> * * - #define %CAIRO_MUTEX_NIL_INITIALIZER to something that can * initialize the #cairo_mutex_t type you defined. Most of the * time one of 0, %NULL, or {} works. At this point * you should be able to compile the following snippet: * + * <programlisting> * cairo_mutex_t _cairo_some_mutex = CAIRO_MUTEX_NIL_INITIALIZER; * * if (1) - * %CAIRO_MUTEX_LOCK (_cairo_some_mutex); + * CAIRO_MUTEX_LOCK (_cairo_some_mutex); * else - * %CAIRO_MUTEX_UNLOCK (_cairo_some_mutex); + * CAIRO_MUTEX_UNLOCK (_cairo_some_mutex); + * </programlisting> * * - If the above code is not enough to initialize a mutex on * your platform, #define CAIRO_MUTEX_INIT(mutex) to statement * to initialize the mutex (allocate resources, etc). Such that * you should be able to compile AND RUN the following snippet: * + * <programlisting> * cairo_mutex_t _cairo_some_mutex = CAIRO_MUTEX_NIL_INITIALIZER; * - * %CAIRO_MUTEX_INIT (_cairo_some_mutex); + * CAIRO_MUTEX_INIT (_cairo_some_mutex); * * if (1) - * %CAIRO_MUTEX_LOCK (_cairo_some_mutex); + * CAIRO_MUTEX_LOCK (_cairo_some_mutex); * else - * %CAIRO_MUTEX_UNLOCK (_cairo_some_mutex); + * CAIRO_MUTEX_UNLOCK (_cairo_some_mutex); + * </programlisting> * * - If you define CAIRO_MUTEX_INIT(mutex), cairo will use it to * initialize all static mutex'es. If for any reason that should * not happen (eg. %CAIRO_MUTEX_INIT is just a faster way than * what cairo does using %CAIRO_MUTEX_NIL_INITIALIZER), then - * #define CAIRO_MUTEX_INITIALIZE() CAIRO_MUTEX_NOOP + * <programlisting> + * #define CAIRO_MUTEX_INITIALIZE() CAIRO_MUTEX_NOOP + * </programlisting> * * - If your system supports freeing a mutex object (deallocating * resources, etc), then #define CAIRO_MUTEX_FINI(mutex) to do @@ -130,8 +140,10 @@ CAIRO_BEGIN_DECLS * However, it's up to you to call CAIRO_MUTEX_FINALIZE() at * proper places, eg. when the system is unloading the cairo library. * So, if for any reason finalizing static mutex'es is not needed - * (eg. you never call %CAIRO_MUTEX_FINALIZE), then - * #define CAIRO_MUTEX_FINALIZE() CAIRO_MUTEX_NOOP + * (eg. you never call CAIRO_MUTEX_FINALIZE()), then + * <programlisting> + * #define CAIRO_MUTEX_FINALIZE() CAIRO_MUTEX_NOOP + * </programlisting> * * - That is all. If for any reason you think the above API is * not enough to implement #cairo_mutex_t on your system, please |