[Asterisk-code-review] loader: Use vector to build apha sorted module lists. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Dec 14 20:15:15 CST 2017


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/7521 )

Change subject: loader: Use vector to build apha sorted module lists.
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.asterisk.org/#/c/7521/2/main/loader.c
File main/loader.c:

https://gerrit.asterisk.org/#/c/7521/2/main/loader.c@1558
PS2, Line 1558: 	if (AST_DLLIST_TRYLOCK(&module_list)) {
              : 		unlock = 0;
              : 	}
> Oh my.  If we couldn't get the lock we should not be continuing.  Though th
It looks like TRYLOCK was used from the start, this hasn't been changed since it was initially added.  I just checked the callers, I don't think LOCK would be a problem for any of them.

I think we should just remove the ast_update_module_list variant from master and leave it to the ast_update_module_list_data variant.

https://reviewboard.asterisk.org/r/3777/


https://gerrit.asterisk.org/#/c/7521/2/main/loader.c@1573
PS2, Line 1573: 	AST_VECTOR_FREE(&alpha_module_list);
> To be consistent, you could free after unlocking like the others.
Reducing time under lock sounds like a good idea.



-- 
To view, visit https://gerrit.asterisk.org/7521
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9c519f4dec3cda98b2f34d314255a31d49a6a467
Gerrit-Change-Number: 7521
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 15 Dec 2017 02:15:15 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171214/ad759a4e/attachment.html>


More information about the asterisk-code-review mailing list