[Asterisk-code-review] Provide SCOPED LOCK variant for AST RWLIST. (asterisk[master])

Joerg Sonnenberger asteriskteam at digium.com
Wed Jun 3 14:51:57 CDT 2015


Joerg Sonnenberger has posted comments on this change.

Change subject: Provide SCOPED_LOCK variant for AST_RWLIST.
......................................................................


Patch Set 1:

The difference with the expansion of ao2_cleanup and co is that it is invariant under the arguments. You always start more or less from a void * and get a void *. With AST_RWLIST_UNLOCK, you start from some list type and end up with a ast_rwlock_t. The list type is the argument to the dtor, not ast_rwlock_t.

I'm completely ambivalent about placing this in linkedlist.h instead, the idea behind using lock.h was just that it fit more naturally. Provide a macro to get the lock from the list type would also work to keep the implementation details separated.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I201fb77d68ef56f5e0388b256c4c0d624c0277e8
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joerg Sonnenberger <joerg at bec.de>
Gerrit-Reviewer: Joerg Sonnenberger <joerg at bec.de>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list