[Asterisk-code-review] Provide SCOPED LOCK variant for AST RWLIST. (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Tue Jun 2 18:52:02 CDT 2015
Richard Mudgett has posted comments on this change.
Change subject: Provide SCOPED_LOCK variant for AST_RWLIST.
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/573/1//COMMIT_MSG
Commit Message:
Line 7: Provide SCOPED_LOCK variant for AST_RWLIST.
Why is this variant needed? What problem does not having it cause?
https://gerrit.asterisk.org/#/c/573/1/include/asterisk/lock.h
File include/asterisk/lock.h:
Line 620: #define SCOPED_RWLIST_RDLOCK(varname, head) SCOPED_LOCK(varname, &(head)->lock, ast_rwlock_rdlock, ast_rwlock_unlock)
:
: /*!
: * \brief scoped lock specialization for write locks of AST_RWLIST
: */
: #define SCOPED_RWLIST_WRLOCK(varname, head) SCOPED_LOCK(varname, &(head)->lock, ast_rwlock_wrlock, ast_rwlock_unlock)
Define these in terms of SCOPED_RDLOCK and SCOPED_WRLOCK respectively.
Also this exposes how to access the list's lock member outside of the linkedlist.h header.
--
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: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list