Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Enumerations | Functions
afw_lock.h File Reference

Adaptive Framework locks. More...

#include "afw_interface.h"

Go to the source code of this file.

Data Structures

struct  afw_lock_s
 
struct  afw_lock_rw_s
 

Macros

#define AFW_LOCK_BEGIN(instance)
 Macro to begin a lock section. More...
 
#define AFW_LOCK_END
 Macro to end a lock section. More...
 
#define AFW_LOCK_READ_BEGIN(instance)
 Macro to begin a read lock section for pool. More...
 
#define AFW_LOCK_READ_END
 Macro to end a read lock section for pool. More...
 
#define AFW_LOCK_WRITE_BEGIN(instance)
 Macro to begin a write lock section. More...
 
#define AFW_LOCK_WRITE_END
 Macro to end a write lock section. More...
 

Enumerations

enum  afw_lock_type_t {
  afw_lock_type_global_mutex , afw_lock_type_process_mutex , afw_lock_type_thread_mutex , afw_lock_type_thread_recursive_mutex ,
  afw_lock_type_thread_read_write
}
 Lock type.
 

Functions

const afw_lock_tafw_lock_create (const afw_utf8_t *lock_id, const afw_utf8_t *brief, const afw_utf8_t *description, afw_boolean_t insure_recursive_lock, const afw_pool_t *p, afw_xctx_t *xctx)
 Create a lock that will last for life of pool. More...
 
const afw_lock_tafw_lock_create_and_register (const afw_utf8_t *lock_id, const afw_utf8_t *brief, const afw_utf8_t *description, afw_boolean_t insure_recursive_lock, afw_xctx_t *xctx)
 Create a lock and register in environment. More...
 
const afw_lock_tafw_lock_create_environment_lock (const afw_utf8_t *lock_id, const afw_pool_t *p, afw_xctx_t *xctx)
 
void afw_lock_obtain (const afw_lock_t *instance, afw_xctx_t *xctx)
 Obtain lock. More...
 
void afw_lock_obtain_debug (const afw_lock_t *instance, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
 Debug version of obtain lock. More...
 
void afw_lock_release (const afw_lock_t *instance, afw_xctx_t *xctx)
 Release lock. More...
 
void afw_lock_release_debug (const afw_lock_t *instance, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
 Debug version of release lock. More...
 
const afw_lock_rw_tafw_lock_create_rw (const afw_utf8_t *lock_id, const afw_utf8_t *brief, const afw_utf8_t *description, const afw_pool_t *p, afw_xctx_t *xctx)
 Create a read/write lock that will last for life of pool. More...
 
const afw_lock_rw_tafw_lock_create_rw_and_register (const afw_utf8_t *lock_id, const afw_utf8_t *brief, const afw_utf8_t *description, afw_xctx_t *xctx)
 Create a read/write lock and register in environment. More...
 
void afw_lock_read_obtain (const afw_lock_rw_t *instance, afw_xctx_t *xctx)
 Obtain read lock. More...
 
void afw_lock_read_obtain_debug (const afw_lock_rw_t *instance, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
 Debug version of obtain read lock. More...
 
void afw_lock_read_release (const afw_lock_rw_t *instance, afw_xctx_t *xctx)
 Release read lock. More...
 
void afw_lock_read_release_debug (const afw_lock_rw_t *instance, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
 Debug version of release read lock. More...
 
void afw_lock_write_obtain (const afw_lock_rw_t *instance, afw_xctx_t *xctx)
 Obtain write lock. More...
 
void afw_lock_write_obtain_debug (const afw_lock_rw_t *instance, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
 Debug version of obtain write lock. More...
 
void afw_lock_write_release (const afw_lock_rw_t *instance, afw_xctx_t *xctx)
 Release write lock. More...
 
void afw_lock_write_release_debug (const afw_lock_rw_t *instance, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
 Debug version of release write lock. More...
 

Detailed Description

Adaptive Framework locks.

Definition in file afw_lock.h.