Changeset 4411 for pjproject/trunk/pjlib/src/pj/lock.c
- Timestamp:
- Mar 4, 2013 4:34:38 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/lock.c
r4359 r4411 352 352 while (lck != &glock->lock_list) { 353 353 if (lck->lock != glock->own_lock) { 354 unsignedi;354 int i; 355 355 for (i=0; i<glock->owner_cnt; ++i) 356 356 pj_lock_release(lck->lock); … … 448 448 } 449 449 450 PJ_DEF(pj_status_t) pj_grp_lock_replace( pj_grp_lock_t *old ,451 pj_grp_lock_t *new )450 PJ_DEF(pj_status_t) pj_grp_lock_replace( pj_grp_lock_t *old_lock, 451 pj_grp_lock_t *new_lock) 452 452 { 453 453 grp_destroy_callback *ocb; 454 454 455 455 /* Move handlers from old to new */ 456 ocb = old ->destroy_list.next;457 while (ocb != &old ->destroy_list) {456 ocb = old_lock->destroy_list.next; 457 while (ocb != &old_lock->destroy_list) { 458 458 grp_destroy_callback *ncb; 459 459 460 ncb = PJ_POOL_ALLOC_T(new ->pool, grp_destroy_callback);460 ncb = PJ_POOL_ALLOC_T(new_lock->pool, grp_destroy_callback); 461 461 ncb->comp = ocb->comp; 462 462 ncb->handler = ocb->handler; 463 pj_list_push_back(&new ->destroy_list, ncb);463 pj_list_push_back(&new_lock->destroy_list, ncb); 464 464 465 465 ocb = ocb->next; 466 466 } 467 467 468 pj_list_init(&old ->destroy_list);469 470 grp_lock_destroy(old );468 pj_list_init(&old_lock->destroy_list); 469 470 grp_lock_destroy(old_lock); 471 471 return PJ_SUCCESS; 472 472 } … … 615 615 { 616 616 grp_lock_item *lck, *new_lck; 617 unsignedi;617 int i; 618 618 619 619 grp_lock_acquire(glock); … … 654 654 655 655 if (lck != &glock->lock_list) { 656 unsignedi;656 int i; 657 657 658 658 pj_list_erase(lck);
Note: See TracChangeset
for help on using the changeset viewer.