core: Disable astobj2 locking for some common objects.

* ACO options
* Indications
* Module loader ref_debug object
* Media index info and variants
* xmldoc items

These allocation locations were identified using reflocks.py on the
master branch.

Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
This commit is contained in:
Corey Farrell
2018-10-01 23:12:14 -04:00
parent f066dbc353
commit 3b2310332d
5 changed files with 17 additions and 7 deletions

View File

@@ -222,7 +222,8 @@ int aco_option_register_deprecated(struct aco_info *info, const char *name, stru
return -1;
}
if (!(opt = ao2_alloc(sizeof(*opt), config_option_destroy))) {
opt = ao2_alloc_options(sizeof(*opt), config_option_destroy, AO2_ALLOC_OPT_LOCK_NOLOCK);
if (!opt) {
return -1;
}
@@ -313,7 +314,9 @@ int __aco_option_register(struct aco_info *info, const char *name, enum aco_matc
return -1;
}
if (!(opt = ao2_alloc(sizeof(*opt) + argc * sizeof(opt->args[0]), config_option_destroy))) {
opt = ao2_alloc_options(sizeof(*opt) + argc * sizeof(opt->args[0]),
config_option_destroy, AO2_ALLOC_OPT_LOCK_NOLOCK);
if (!opt) {
return -1;
}