mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user