Re: [PATCH RFC 01/24] compiler_types: Move lock checking attributes to compiler-capability-analysis.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/6/25 10:09 AM, Marco Elver wrote:
+/* Sparse context/lock checking support. */
+# define __must_hold(x)		__attribute__((context(x,1,1)))
+# define __acquires(x)		__attribute__((context(x,0,1)))
+# define __cond_acquires(x)	__attribute__((context(x,0,-1)))
+# define __releases(x)		__attribute__((context(x,1,0)))
+# define __acquire(x)		__context__(x,1)
+# define __release(x)		__context__(x,-1)
+# define __cond_lock(x, c)	((c) ? ({ __acquire(x); 1; }) : 0)

If support for Clang thread-safety attributes is added, an important
question is what to do with the sparse context attribute. I think that
more developers are working on improving and maintaining Clang than
sparse. How about reducing the workload of kernel maintainers by
only supporting the Clang thread-safety approach and by dropping support
for the sparse context attribute?

Thanks,

Bart.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux