diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-08-03 16:24:39 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-08-11 11:58:38 -0500 |
commit | 5ba6357be2a140e558ddc14b7669bb08d035944d (patch) | |
tree | 048f51a0e7fafb5246e46510e957f739e45e8387 /main | |
parent | e845ef6762bdfd404f1f3f2b5c22c66e49eaec68 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/named_locks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/named_locks.c b/main/named_locks.c index b977b553c..596048388 100644 --- a/main/named_locks.c +++ b/main/named_locks.c @@ -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; } |