Re: [PATCH RFC 11/24] locking/mutex: Support Clang's capability analysis

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

 



On Thu, Feb 06, 2025 at 07:10:05PM +0100, Marco Elver wrote:

>  extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock,
> +					unsigned int subclass) __cond_acquires(0, lock);
>  extern int __must_check mutex_lock_killable_nested(struct mutex *lock,
> +					unsigned int subclass) __cond_acquires(0, lock);

> +extern int __must_check mutex_lock_interruptible(struct mutex *lock) __cond_acquires(0, lock);
> +extern int __must_check mutex_lock_killable(struct mutex *lock) __cond_acquires(0, lock);

> +extern int mutex_trylock(struct mutex *lock) __cond_acquires(1, lock);

> +extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock) __cond_acquires(1, lock);

So this form is *MUCH* saner than what we currently have.

Can we please fix up all the existing __cond_lock() code too?




[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