mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
ovs-thread: Mark lock and unlock functions as no_thread_safety_analysis.
I don't see any other way to make Clang realize that these are the real mutex implementation functions. I first noticed these warnings with Clang 1:3.4~svn188890-1~exp1. I previously used version 1:3.4~svn187484-1~exp1. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
@@ -128,6 +128,8 @@
|
||||
#define OVS_EXCLUDED(...) __attribute__((locks_excluded(__VA_ARGS__)))
|
||||
#define OVS_ACQ_BEFORE(...) __attribute__((acquired_before(__VA_ARGS__)))
|
||||
#define OVS_ACQ_AFTER(...) __attribute__((acquired_after(__VA_ARGS__)))
|
||||
#define OVS_NO_THREAD_SAFETY_ANALYSIS \
|
||||
__attribute__((no_thread_safety_analysis))
|
||||
#else /* not Clang */
|
||||
#define OVS_LOCKABLE
|
||||
#define OVS_REQ_RDLOCK(...)
|
||||
@@ -145,6 +147,7 @@
|
||||
#define OVS_RELEASES(...)
|
||||
#define OVS_ACQ_BEFORE(...)
|
||||
#define OVS_ACQ_AFTER(...)
|
||||
#define OVS_NO_THREAD_SAFETY_ANALYSIS
|
||||
#endif
|
||||
|
||||
/* ISO C says that a C implementation may choose any integer type for an enum
|
||||
|
||||
Reference in New Issue
Block a user