Ignore:
Timestamp:
Sep 19, 2006 1:37:53 PM (18 years ago)
Author:
bennylp
Message:

Fixed race-condition/deadlock problems in the dialog/user agent layer
all the way up to PJSUA-API:

  • standardized locking order: dialog then user agent, and dialog then PJSUA
  • any threads that attempt to acquire mutexes in different order than above MUST employ retry mechanism (for an example, see acquire_call() in pjsua_call.c). This retry mechanism has also been used in the UA layer (sip_ua_layer.c) since it needs to lock user agent layer first before the dialog.
  • introduced pjsip_dlg_try_inc_lock() and PJSUA_TRY_LOCK() to accomodate above.
  • pjsua tested on Quad Xeon with 4 threads and 200 cps, so far so good.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r721 r729  
    11971197    PJ_UNUSED_ARG(timer_heap); 
    11981198 
     1199    if (call_id == PJSUA_INVALID_ID) { 
     1200        PJ_LOG(1,(THIS_FILE, "Invalid call ID in timer callback")); 
     1201        return; 
     1202    } 
     1203     
    11991204    /* Add warning header */ 
    12001205    pjsua_msg_data_init(&msg_data); 
Note: See TracChangeset for help on using the changeset viewer.