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

Corey Farrell asteriskteam at digium.com
Sun May 3 10:52:02 CDT 2015


Corey Farrell has posted comments on this change.

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


Patch Set 2: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/339/2/include/asterisk/vector.h
File include/asterisk/vector.h:

Line 72: #define AST_RWVECTOR_WRLOCK(vec) \
This invites AST_RWVECTOR users to cause a recursive rwlock.

To avoid recursive rwlock we need either:
1) Remove this macro, just call ast_rwlock_wrlock directly where needed.
2) Add flag for OBJ_NOLOCK to all macro's that would grab a lock.


Line 84: #define AST_RWVECTOR_RDLOCK(vec) \
Same comments from AST_RWVECTOR_RDLOCK.


https://gerrit.asterisk.org/#/c/339/2/tests/test_vector.c
File tests/test_vector.c:

Line 60: AST_TEST_DEFINE(basic_ops)
Can you duplicate the tests like you did in callbacks?  This way we get full coverage for the AST_RWVECTOR variant of the macros.


-- 
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: 2
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-HasComments: Yes



More information about the asterisk-code-review mailing list