mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-10-18 10:06:27 +00:00
Disable thread safety analysis on conditional locks (#2498)
Clang does not support this: https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditional-locks Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
This commit is contained in:
parent
77ffe7d634
commit
23efccbe39
@ -66,6 +66,9 @@ extern std::string instance_name;
|
|||||||
#define REQUIRES(...) \
|
#define REQUIRES(...) \
|
||||||
THREAD_ANNOTATION_ATTRIBUTE(requires_capability(__VA_ARGS__))
|
THREAD_ANNOTATION_ATTRIBUTE(requires_capability(__VA_ARGS__))
|
||||||
|
|
||||||
|
#define NO_THREAD_SAFETY_ANALYSIS \
|
||||||
|
THREAD_ANNOTATION_ATTRIBUTE(no_thread_safety_analysis)
|
||||||
|
|
||||||
#endif // S3FS_COMMON_H_
|
#endif // S3FS_COMMON_H_
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -228,8 +228,8 @@ class S3fsCurl
|
|||||||
static bool DestroyGlobalCurl();
|
static bool DestroyGlobalCurl();
|
||||||
static bool InitShareCurl();
|
static bool InitShareCurl();
|
||||||
static bool DestroyShareCurl();
|
static bool DestroyShareCurl();
|
||||||
static void LockCurlShare(CURL* handle, curl_lock_data nLockData, curl_lock_access laccess, void* useptr);
|
static void LockCurlShare(CURL* handle, curl_lock_data nLockData, curl_lock_access laccess, void* useptr) NO_THREAD_SAFETY_ANALYSIS;
|
||||||
static void UnlockCurlShare(CURL* handle, curl_lock_data nLockData, void* useptr);
|
static void UnlockCurlShare(CURL* handle, curl_lock_data nLockData, void* useptr) NO_THREAD_SAFETY_ANALYSIS;
|
||||||
static bool InitCryptMutex();
|
static bool InitCryptMutex();
|
||||||
static bool DestroyCryptMutex();
|
static bool DestroyCryptMutex();
|
||||||
static int CurlProgress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
|
static int CurlProgress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
|
||||||
|
@ -84,7 +84,7 @@ struct CRYPTO_dynlock_value
|
|||||||
|
|
||||||
static std::mutex* s3fs_crypt_mutex = nullptr;
|
static std::mutex* s3fs_crypt_mutex = nullptr;
|
||||||
|
|
||||||
static void s3fs_crypt_mutex_lock(int mode, int pos, const char* file, int line) __attribute__ ((unused));
|
static void s3fs_crypt_mutex_lock(int mode, int pos, const char* file, int line) __attribute__ ((unused)) NO_THREAD_SAFETY_ANALYSIS;
|
||||||
static void s3fs_crypt_mutex_lock(int mode, int pos, const char* file, int line)
|
static void s3fs_crypt_mutex_lock(int mode, int pos, const char* file, int line)
|
||||||
{
|
{
|
||||||
if(s3fs_crypt_mutex){
|
if(s3fs_crypt_mutex){
|
||||||
@ -109,7 +109,7 @@ static struct CRYPTO_dynlock_value* s3fs_dyn_crypt_mutex(const char* file, int l
|
|||||||
return dyndata;
|
return dyndata;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void s3fs_dyn_crypt_mutex_lock(int mode, struct CRYPTO_dynlock_value* dyndata, const char* file, int line) __attribute__ ((unused));
|
static void s3fs_dyn_crypt_mutex_lock(int mode, struct CRYPTO_dynlock_value* dyndata, const char* file, int line) __attribute__ ((unused)) NO_THREAD_SAFETY_ANALYSIS;
|
||||||
static void s3fs_dyn_crypt_mutex_lock(int mode, struct CRYPTO_dynlock_value* dyndata, const char* file, int line)
|
static void s3fs_dyn_crypt_mutex_lock(int mode, struct CRYPTO_dynlock_value* dyndata, const char* file, int line)
|
||||||
{
|
{
|
||||||
if(dyndata){
|
if(dyndata){
|
||||||
|
Loading…
Reference in New Issue
Block a user