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:57:51 -0500 |
commit | e1248c30756ed9f48ba0f06c46a876c5d08cbb11 (patch) | |
tree | 977c7dd0686c131445f353356665629eb72f1536 /main/named_locks.c | |
parent | 1a3cc843718a35eb69168304c54ec9e7caec6ffd (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/named_locks.c')
-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; } |