named_locks: Use ao2_weakproxy to deal with cleanup from container.
authorCorey Farrell <git@cfware.com>
Thu, 18 Aug 2016 18:28:57 +0000 (14:28 -0400)
committerCorey Farrell <git@cfware.com>
Fri, 2 Sep 2016 13:13:45 +0000 (09:13 -0400)
commit131baf70d6f349f7adee81419410f78790c0ebda
tree6ad4e5fefd35ee2b7020a73e0c85d078aec9a6c9
parent0c5b6e9ff559dcb20d9315154d4bd6a2ea5aa6a9
named_locks: Use ao2_weakproxy to deal with cleanup from container.

This allows standard ao2 functions to be used to release references to
an ast_named_lock.  This change can cause less frequent locking of the
global named_locks container.  The container is no longer locked when a
named_lock reference is being release except when this causes the
named_lock to be destroyed.

Change-Id: I644e39c6d83a153d71b3fae77ec05599d725e7e6
include/asterisk/named_locks.h
main/named_locks.c