[Asterisk-code-review] core: Add AO2_ALLOC_OPT_NO_REF_DEBUG option. (...asterisk[master])

Richard Mudgett asteriskteam at digium.com
Mon Sep 23 12:09:13 CDT 2019


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/12912 )

Change subject: core: Add AO2_ALLOC_OPT_NO_REF_DEBUG option.
......................................................................


Patch Set 1:

(4 comments)

> Patch Set 1:
> 
> In theory this can be backported just without switching the astobj2.h macro's from "" to NULL.  This would be a slight change of behavior where ao2_t_ref(obj, -1, NULL) would no longer suppress ao2 logging.  I'm indifferent to backporting or not.

I don't think this behavior change would cause issues in earlier branches.

I didn't give a -1 as the other comments are just nits.

https://gerrit.asterisk.org/#/c/12912/1/include/asterisk/astobj2.h 
File include/asterisk/astobj2.h:

https://gerrit.asterisk.org/#/c/12912/1/include/asterisk/astobj2.h@365 
PS1, Line 365: 	AO2_ALLOC_OPT_LOCK_MUTEX = 0x00,
The previous shift format was showing bit fields.  I'd prefer for that to still be the case.


https://gerrit.asterisk.org/#/c/12912/1/main/astobj2.c 
File main/astobj2.c:

https://gerrit.asterisk.org/#/c/12912/1/main/astobj2.c@93 
PS1, Line 93: 	uint32_t magic:28;
Sigh.  And another bit stolen from the magic number field.


https://gerrit.asterisk.org/#/c/12912/1/main/astobj2_hash.c 
File main/astobj2_hash.c:

https://gerrit.asterisk.org/#/c/12912/1/main/astobj2_hash.c@213 
PS1, Line 213: 	node = ao2_alloc_options(sizeof(*node), hash_ao2_node_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK | AO2_ALLOC_OPT_NO_REF_DEBUG);
Need to break the long line.


https://gerrit.asterisk.org/#/c/12912/1/main/astobj2_rbtree.c 
File main/astobj2_rbtree.c:

https://gerrit.asterisk.org/#/c/12912/1/main/astobj2_rbtree.c@908 
PS1, Line 908: 	node = ao2_alloc_options(sizeof(*node), rb_ao2_node_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK | AO2_ALLOC_OPT_NO_REF_DEBUG);
Same here



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12912
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I3c17d867d901d53f9fcd512bef4d52e342637b54
Gerrit-Change-Number: 12912
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Mon, 23 Sep 2019 17:09:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190923/f8ac1776/attachment.html>


More information about the asterisk-code-review mailing list