[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 1/3] xen/spinlock: add explicit non-recursive locking functions
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Juergen Gross <jgross@xxxxxxxx>
- Date: Wed, 14 Dec 2022 11:32:22 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Lukasz Hawrylko <lukasz@xxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Mateusz Mówka <mateusz.mowka@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 14 Dec 2022 10:32:31 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 14.12.22 11:21, Jan Beulich wrote:
On 10.09.2022 17:49, Juergen Gross wrote:
In order to prepare a type-safe recursive spinlock structure, add
explicitly non-recursive locking functions to be used for non-recursive
locking of spinlocks, which are use recursively, too.
While I can see that something needs doing, a function name like
spin_unlock_nonrecursive_irqrestore() is really unwieldy, imo.
Would you be fine with s/nonrecursive/nonrec/ in all the names?
Just one minor further remark:
@@ -64,7 +64,7 @@ void pcidevs_unlock(void)
bool_t pcidevs_locked(void)
{
- return !!spin_is_locked(&_pcidevs_lock);
+ return !!spin_recursive_is_locked(&_pcidevs_lock);
}
While touching this line, could you please also get rid of the !! ?
Okay.
Juergen
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
|