diff options
author | David Lamparter <equinox@diac24.net> | 2019-06-21 10:58:02 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-09-03 17:15:17 +0200 |
commit | 00dffa8cde7661e00245ebe1b1eea248b8dd6802 (patch) | |
tree | a1e698d6b613b63407b3ad786565d09c7e7b7382 /.clang-format | |
parent | lib: add some macro helpers (diff) | |
download | frr-00dffa8cde7661e00245ebe1b1eea248b8dd6802.tar.xz frr-00dffa8cde7661e00245ebe1b1eea248b8dd6802.zip |
lib: add frr_with_mutex() block-wrapper
frr_with_mutex(...) { ... } locks and automatically unlocks the listed
mutex(es) when the block is exited. This adds a bit of safety against
forgetting the unlock in error paths & co. and makes the code a slight
bit more readable.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format index 4bd962747..cc68de7b5 100644 --- a/.clang-format +++ b/.clang-format @@ -28,6 +28,8 @@ ForEachMacros: - frr_each - frr_each_safe - frr_each_from + - frr_with_mutex + - frr_elevate_privs - LIST_FOREACH - LIST_FOREACH_SAFE - SLIST_FOREACH |