res_pjsip: Make aor named lock a mutex.

The named aor lock was always being locked for writes so a rwlock adds no
benefit and may be slower because rwlocks are biased toward read locking.

Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28
This commit is contained in:
Richard Mudgett
2016-08-03 16:24:39 -05:00
parent 1a3cc84371
commit e1248c3075
4 changed files with 10 additions and 10 deletions

View File

@@ -87,8 +87,8 @@ static void named_locks_shutdown(void)
int ast_named_locks_init(void)
{
named_locks = ao2_container_alloc_hash(0, 0, NAMED_LOCKS_BUCKETS, named_locks_hash, NULL,
named_locks_cmp);
named_locks = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0,
NAMED_LOCKS_BUCKETS, named_locks_hash, NULL, named_locks_cmp);
if (!named_locks) {
return -1;
}