[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zw-oWIAPdCnQdyF2@casper.infradead.org>
Date: Wed, 16 Oct 2024 12:49:44 +0100
From: Matthew Wilcox <willy@...radead.org>
To: lizhe.67@...edance.com
Cc: peterz@...radead.org, mingo@...hat.com, will@...nel.org,
longman@...hat.com, boqun.feng@...il.com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC 1/2] rwsem: introduce upgrade_read interface
On Wed, Oct 16, 2024 at 12:35:59PM +0800, lizhe.67@...edance.com wrote:
> +++ b/include/linux/rwsem.h
> @@ -249,6 +249,7 @@ DEFINE_GUARD_COND(rwsem_write, _try, down_write_trylock(_T))
> * downgrade write lock to read lock
> */
> extern void downgrade_write(struct rw_semaphore *sem);
> +extern int upgrade_read(struct rw_semaphore *sem);
This needs __must_check, and I think this should be a bool, not an errno
return.
Powered by blists - more mailing lists