Opened 4 years ago

Closed 4 years ago

#2261 closed enhancement (fixed)

Prevent unnecessary locking when adding group lock handler

Reported by: ming Owned by: ming
Priority: normal Milestone: release-2.10
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

pj_grp_lock_add_handler() will lock the group lock first, which has a side effect of potentially establishing an incorrect lock ordering when using thread detector tool such as Helgrind.

We should use pj_grp_lock_create_w_handler() instead that adds the handler during creation and doesn't require acquiring the lock.

Also see ticket #1821

Change History (1)

comment:1 Changed 4 years ago by ming

  • Owner set to ming
  • Resolution set to fixed
  • Status changed from new to closed

In 6136:

Closed #2261: Prevent unnecessary locking when adding group lock handler

Note: See TracTickets for help on using tickets.