Thread (60 messages) 60 messages, 10 authors, 2024-01-20

Re: [PATCH net-next 01/24] locking/local_lock: Introduce guard definition for local_lock.

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2024-01-11 16:19:19
Also in: lkml

On 2023-12-18 09:16:49 [+0100], Paolo Abeni wrote:
quoted
--- a/include/linux/local_lock.h
+++ b/include/linux/local_lock.h
@@ -51,4 +51,15 @@
 #define local_unlock_irqrestore(lock, flags)			\
 	__local_unlock_irqrestore(lock, flags)
 
+DEFINE_LOCK_GUARD_1(local_lock, local_lock_t,
+		    local_lock(_T->lock),
+		    local_unlock(_T->lock))
+DEFINE_LOCK_GUARD_1(local_lock_irq, local_lock_t,
+		    local_lock_irq(_T->lock),
+		    local_unlock_irq(_T->lock))
DEFINE_GUARD should fit for the 2 above, right?
Yes, that will work. Let me update it.
Cheers,

Paolo
Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help