Ignore:
Timestamp:
Mar 6, 2015 6:09:22 AM (9 years ago)
Author:
ming
Message:

Fixed #1821: Remove unnecessary locking in pjsip transaction and add new API to create a group lock with handler in a single atomic instruction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/lock.h

    r4359 r4992  
    219219 
    220220/** 
     221 * Create a group lock object, with the specified destructor handler, to be 
     222 * called by the group lock when it is about to be destroyed. Initially the 
     223 * group lock will have reference counter of one. 
     224 * 
     225 * @param pool          The group lock only uses the pool parameter to get 
     226 *                      the pool factory, from which it will create its own 
     227 *                      pool. 
     228 * @param cfg           Optional configuration. 
     229 * @param member        A pointer to be passed to the handler. 
     230 * @param handler       The destroy handler. 
     231 * @param p_grp_lock    Pointer to receive the newly created group lock. 
     232 * 
     233 * @return              PJ_SUCCESS or the appropriate error code. 
     234 */ 
     235PJ_DECL(pj_status_t) pj_grp_lock_create_w_handler(pj_pool_t *pool, 
     236                                                  const pj_grp_lock_config *cfg, 
     237                                                  void *member, 
     238                                                  void (*handler)(void *member), 
     239                                                  pj_grp_lock_t **p_grp_lock); 
     240 
     241/** 
    221242 * Forcibly destroy the group lock, ignoring the reference counter value. 
    222243 * 
Note: See TracChangeset for help on using the changeset viewer.