BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

lock.h File Reference

Higher abstraction for locking objects. More...

Go to the source code of this file.

Data Structures

struct  pj_grp_lock_config
 

Macros

#define pj_grp_lock_add_ref_dbg(grp_lock, x, y)   pj_grp_lock_add_ref(grp_lock)
 
#define pj_grp_lock_dec_ref_dbg(grp_lock, x, y)   pj_grp_lock_dec_ref(grp_lock)
 

Typedefs

typedef void(* pj_grp_lock_handler) (void *member)
 

Functions

pj_status_t pj_lock_create_simple_mutex (pj_pool_t *pool, const char *name, pj_lock_t **lock)
 
pj_status_t pj_lock_create_recursive_mutex (pj_pool_t *pool, const char *name, pj_lock_t **lock)
 
pj_status_t pj_lock_create_null_mutex (pj_pool_t *pool, const char *name, pj_lock_t **lock)
 
pj_status_t pj_lock_create_semaphore (pj_pool_t *pool, const char *name, unsigned initial, unsigned max, pj_lock_t **lock)
 
pj_status_t pj_lock_acquire (pj_lock_t *lock)
 
pj_status_t pj_lock_tryacquire (pj_lock_t *lock)
 
pj_status_t pj_lock_release (pj_lock_t *lock)
 
pj_status_t pj_lock_destroy (pj_lock_t *lock)
 
void pj_grp_lock_config_default (pj_grp_lock_config *cfg)
 
pj_status_t pj_grp_lock_create (pj_pool_t *pool, const pj_grp_lock_config *cfg, pj_grp_lock_t **p_grp_lock)
 
pj_status_t pj_grp_lock_create_w_handler (pj_pool_t *pool, const pj_grp_lock_config *cfg, void *member, pj_grp_lock_handler handler, pj_grp_lock_t **p_grp_lock)
 
pj_status_t pj_grp_lock_destroy (pj_grp_lock_t *grp_lock)
 
pj_status_t pj_grp_lock_replace (pj_grp_lock_t *old_lock, pj_grp_lock_t *new_lock)
 
pj_status_t pj_grp_lock_acquire (pj_grp_lock_t *grp_lock)
 
pj_status_t pj_grp_lock_tryacquire (pj_grp_lock_t *grp_lock)
 
pj_status_t pj_grp_lock_release (pj_grp_lock_t *grp_lock)
 
pj_status_t pj_grp_lock_add_handler (pj_grp_lock_t *grp_lock, pj_pool_t *pool, void *member, pj_grp_lock_handler handler)
 
pj_status_t pj_grp_lock_del_handler (pj_grp_lock_t *grp_lock, void *member, pj_grp_lock_handler handler)
 
pj_status_t pj_grp_lock_add_ref (pj_grp_lock_t *grp_lock)
 
pj_status_t pj_grp_lock_dec_ref (pj_grp_lock_t *grp_lock)
 
int pj_grp_lock_get_ref (pj_grp_lock_t *grp_lock)
 
void pj_grp_lock_dump (pj_grp_lock_t *grp_lock)
 
pj_status_t pj_grp_lock_chain_lock (pj_grp_lock_t *grp_lock, pj_lock_t *ext_lock, int pos)
 
pj_status_t pj_grp_lock_unchain_lock (pj_grp_lock_t *grp_lock, pj_lock_t *ext_lock)
 

Detailed Description

Higher abstraction for locking objects.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.