[Asterisk-code-review] vector: Traversal, retrieval, insert and locking enhancements (asterisk[13])

Matt Jordan asteriskteam at digium.com
Mon May 4 15:38:54 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: vector:  Traversal, retrieval, insert and locking enhancements
......................................................................


Patch Set 5:

> (2 comments)
 > 
 > If you look at the linked list macros you see that the locking is
 > handled manually anyway.  The list operations do not automatically
 > lock/unlock the lock and most of the RWLIST defines are simply
 > defines to change the name to the normal list define.

That's true. At the same time, one of the main reasons we:
* uppercased the vector macros
* used macros as opposed to a dedicated struct for the container
was to match the linkedlist implementation. It certainly makes it far easier to migrate a linkedlist to a vector (or back) when the implementations are closely aligned.

Given that, I'm not sure why we would be strongly against having macros for the locking. True, it makes that header larger, and it does proliferate the various variants - but it may actually make the code easier to understand, if for no other reason than it is similar to the existing macro implementations.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list