Merge tag 'trace-v5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux-2.6-microblaze.git] / include / linux / local_lock.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_LOCAL_LOCK_H
3 #define _LINUX_LOCAL_LOCK_H
4
5 #include <linux/local_lock_internal.h>
6
7 /**
8  * local_lock_init - Runtime initialize a lock instance
9  */
10 #define local_lock_init(lock)           __local_lock_init(lock)
11
12 /**
13  * local_lock - Acquire a per CPU local lock
14  * @lock:       The lock variable
15  */
16 #define local_lock(lock)                __local_lock(lock)
17
18 /**
19  * local_lock_irq - Acquire a per CPU local lock and disable interrupts
20  * @lock:       The lock variable
21  */
22 #define local_lock_irq(lock)            __local_lock_irq(lock)
23
24 /**
25  * local_lock_irqsave - Acquire a per CPU local lock, save and disable
26  *                       interrupts
27  * @lock:       The lock variable
28  * @flags:      Storage for interrupt flags
29  */
30 #define local_lock_irqsave(lock, flags)                         \
31         __local_lock_irqsave(lock, flags)
32
33 /**
34  * local_unlock - Release a per CPU local lock
35  * @lock:       The lock variable
36  */
37 #define local_unlock(lock)              __local_unlock(lock)
38
39 /**
40  * local_unlock_irq - Release a per CPU local lock and enable interrupts
41  * @lock:       The lock variable
42  */
43 #define local_unlock_irq(lock)          __local_unlock_irq(lock)
44
45 /**
46  * local_unlock_irqrestore - Release a per CPU local lock and restore
47  *                            interrupt flags
48  * @lock:       The lock variable
49  * @flags:      Interrupt flags to restore
50  */
51 #define local_unlock_irqrestore(lock, flags)                    \
52         __local_unlock_irqrestore(lock, flags)
53
54 #endif