|
Adaptive Framework
0.9.0
|
Files | |
| file | afw_pool.h |
| Adaptive Framework memory pool support header. | |
Data Structures | |
| struct | afw_thread_s |
| Struct for public part of afw_pool_t. More... | |
Macros | |
| #define | afw_thread_mutex_create apr_thread_mutex_create |
| Uses apr_thread_mutex_t asis. | |
| #define | afw_thread_mutex_lock apr_thread_mutex_lock |
| Uses apr_thread_mutex_t asis. | |
| #define | afw_thread_mutex_trylock apr_thread_mutex_trylock |
| Uses apr_thread_mutex_trylock asis. | |
| #define | afw_thread_mutex_unlock apr_thread_mutex_unlock |
| Uses apr_thread_mutex_unlock asis. | |
| #define | afw_thread_mutex_destroy apr_thread_mutex_destroy |
| Uses apr_thread_mutex_destroy asis. | |
| #define | AFW_THREAD_FUNCTION APR_THREAD_FUNC |
| Uses APR_THREAD_FUNC as AFW_THREAD_FUNCTION. | |
| #define | AFW_THREAD_MUTEX_LOCK(mutex, xctx) |
| Macro to begin a mutex lock section. More... | |
| #define | AFW_THREAD_MUTEX_UNLOCK() |
| Macro to end a mutex lock. More... | |
Typedefs | |
| typedef void *(AFW_THREAD_FUNCTION * | afw_thread_function_t) (const afw_thread_t *thread, void *arg) |
| Typedef for thread start function. | |
| typedef struct afw_thread_attr_s | afw_thread_attr_t |
| Typedef for afw_thread_attr. | |
Functions | |
| afw_thread_attr_t * | afw_thread_attr_create (const afw_pool_t *p, afw_xctx_t *xctx) |
| Create a thread attr. More... | |
| const afw_thread_t * | afw_thread_create (afw_thread_attr_t *thread_attr, afw_thread_function_t start_function, void *start_function_arg, const afw_utf8_t *name, afw_integer_t thread_number, afw_xctx_t *xctx) |
| Create a thread. More... | |
| void | afw_thread_join (const afw_thread_t *thread, afw_xctx_t *xctx) |
| Join a thread. More... | |
Thread support.
| #define AFW_THREAD_MUTEX_LOCK | ( | mutex, | |
| xctx | |||
| ) |
Macro to begin a mutex lock section.
| xctx | of caller. |
Usage:
AFW_THREAD_MUTEX_LOCK(xctx) { ... a very small amount of code that doesn't call anything } AFW_THREAD_MUTEX_UNLOCK();
Definition at line 137 of file afw_thread.h.
| #define AFW_THREAD_MUTEX_UNLOCK | ( | ) |
Macro to end a mutex lock.
See AFW_THREAD_MUTEX_LOCK for usage.
Definition at line 151 of file afw_thread.h.
| afw_thread_attr_t* afw_thread_attr_create | ( | const afw_pool_t * | p, |
| afw_xctx_t * | xctx | ||
| ) |
Create a thread attr.
| p | to use. |
| xctx | of caller. |
Definition at line 19 of file afw_thread.c.
| const afw_thread_t* afw_thread_create | ( | afw_thread_attr_t * | thread_attr, |
| afw_thread_function_t | start_function, | ||
| void * | start_function_arg, | ||
| const afw_utf8_t * | name, | ||
| afw_integer_t | thread_number, | ||
| afw_xctx_t * | xctx | ||
| ) |
Create a thread.
| thread_attr | to use. |
| start_function | to call when thread starts. |
| start_function_arg | to pass to start function. |
| name | to be associated with thread. |
| thread_number | to be associated with thread. |
| p | to use. |
| xctx | of caller. |
Definition at line 41 of file afw_thread.c.
| void afw_thread_join | ( | const afw_thread_t * | thread, |
| afw_xctx_t * | xctx | ||
| ) |
Join a thread.
| thread | to join. |
| xctx | of caller. |
Definition at line 71 of file afw_thread.c.