[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/51] clang-tsa: Add macros for shared locks
From: |
Kevin Wolf |
Subject: |
[PULL 40/51] clang-tsa: Add macros for shared locks |
Date: |
Wed, 14 Dec 2022 14:44:42 +0100 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221207131838.239125-8-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/qemu/clang-tsa.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/qemu/clang-tsa.h b/include/qemu/clang-tsa.h
index 211ee0ae73..ba06fb8c92 100644
--- a/include/qemu/clang-tsa.h
+++ b/include/qemu/clang-tsa.h
@@ -62,6 +62,7 @@
* void Foo(void) TSA_REQUIRES(mutex);
*/
#define TSA_REQUIRES(...) TSA(requires_capability(__VA_ARGS__))
+#define TSA_REQUIRES_SHARED(...) TSA(requires_shared_capability(__VA_ARGS__))
/* TSA_EXCLUDES() is used to annotate functions: the caller of the
* function MUST NOT hold resource, the function first acquires the
@@ -82,6 +83,7 @@
* void Foo(void) TSA_ACQUIRE(mutex);
*/
#define TSA_ACQUIRE(...) TSA(acquire_capability(__VA_ARGS__))
+#define TSA_ACQUIRE_SHARED(...) TSA(acquire_shared_capability(__VA_ARGS__))
/* TSA_RELEASE() is used to annotate functions: the caller of the
* function MUST hold the resource, but the function will then release it.
@@ -91,6 +93,7 @@
* void Foo(void) TSA_RELEASE(mutex);
*/
#define TSA_RELEASE(...) TSA(release_capability(__VA_ARGS__))
+#define TSA_RELEASE_SHARED(...) TSA(release_shared_capability(__VA_ARGS__))
/* TSA_NO_TSA is used to annotate functions. Use only when you need to.
*
@@ -106,5 +109,6 @@
* More than one mutex may be specified, comma-separated.
*/
#define TSA_ASSERT(...) TSA(assert_capability(__VA_ARGS__))
+#define TSA_ASSERT_SHARED(...) TSA(assert_shared_capability(__VA_ARGS__))
#endif /* #ifndef CLANG_TSA_H */
--
2.38.1
- [PULL 36/51] graph-lock: Implement guard macros, (continued)
- [PULL 36/51] graph-lock: Implement guard macros, Kevin Wolf, 2022/12/14
- [PULL 26/51] block: distinguish between bdrv_create running in coroutine and not, Kevin Wolf, 2022/12/14
- [PULL 25/51] block: avoid duplicating filename string in bdrv_create, Kevin Wolf, 2022/12/14
- [PULL 24/51] block/vmdk: add coroutine_fn annotations, Kevin Wolf, 2022/12/14
- [PULL 28/51] block: rename generated_co_wrapper in co_wrapper_mixed, Kevin Wolf, 2022/12/14
- [PULL 27/51] block: bdrv_create_file is a coroutine_fn, Kevin Wolf, 2022/12/14
- [PULL 32/51] block: convert bdrv_create to co_wrapper, Kevin Wolf, 2022/12/14
- [PULL 35/51] graph-lock: Introduce a lock to protect block graph operations, Kevin Wolf, 2022/12/14
- [PULL 38/51] Import clang-tsa.h, Kevin Wolf, 2022/12/14
- [PULL 33/51] block/dirty-bitmap: convert coroutine-only functions to co_wrapper, Kevin Wolf, 2022/12/14
- [PULL 40/51] clang-tsa: Add macros for shared locks,
Kevin Wolf <=
- [PULL 41/51] configure: Enable -Wthread-safety if present, Kevin Wolf, 2022/12/14
- [PULL 42/51] test-bdrv-drain: Fix incorrrect drain assumptions, Kevin Wolf, 2022/12/14
- [PULL 37/51] async: Register/unregister aiocontext in graph lock list, Kevin Wolf, 2022/12/14
- [PULL 50/51] block: use co_wrapper_mixed_bdrv_rdlock in functions taking the rdlock, Kevin Wolf, 2022/12/14
- [PULL 47/51] graph-lock: TSA annotations for lock/unlock functions, Kevin Wolf, 2022/12/14
- [PULL 48/51] Mark assert_bdrv_graph_readable/writable() GRAPH_RD/WRLOCK, Kevin Wolf, 2022/12/14
- [PULL 46/51] block: assert that graph read and writes are performed correctly, Kevin Wolf, 2022/12/14
- [PULL 30/51] block-coroutine-wrapper.py: support functions without bs arg, Kevin Wolf, 2022/12/14
- [PULL 34/51] block: Factor out bdrv_drain_all_begin_nopoll(), Kevin Wolf, 2022/12/14
- [PULL 44/51] block: wrlock in bdrv_replace_child_noperm, Kevin Wolf, 2022/12/14