mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
cuse(3): annotate cuse_init() to suppress thread safety analysis
This avoids warnings from clang 21, similar to:
/usr/src/lib/libcuse/cuse_lib.c:111:14: error: writing variable 'h_cuse' requires holding mutex 'm_cuse' exclusively [-Werror,-Wthread-safety-analysis]
111 | TAILQ_INIT(&h_cuse);
| ^
/usr/src/lib/libcuse/cuse_lib.c:111:14: error: writing variable 'h_cuse' requires holding mutex 'm_cuse' exclusively [-Werror,-Wthread-safety-analysis]
/usr/src/lib/libcuse/cuse_lib.c:112:14: error: writing variable 'h_cuse_entered' requires holding mutex 'm_cuse' exclusively [-Werror,-Wthread-safety-analysis]
112 | TAILQ_INIT(&h_cuse_entered);
| ^
/usr/src/lib/libcuse/cuse_lib.c:112:14: error: writing variable 'h_cuse_entered' requires holding mutex 'm_cuse' exclusively [-Werror,-Wthread-safety-analysis]
MFC after: 3 days
This commit is contained in:
1 parent
4f184fd35d
commit
5629b5cf79
1 file changed
+1
-1
@@ -93,7 +93,7 @@ static struct cuse_vm_allocation a_cuse[CUSE_ALLOC_UNIT_MAX]
|
||||
pthread_mutex_unlock(&m_cuse)
|
||||
|
||||
int
|
||||
cuse_init(void)
|
||||
cuse_init(void) __no_lock_analysis
|
||||
{
|
||||
pthread_mutexattr_t attr;
|
||||
|
||||
|
||||
Reference in new issue
Block a user