diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-10-26 14:41:29 -0400 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-11-05 16:38:09 -0500 |
commit | 84e5acb76dacb8ebd648a86a53907ce0dd616534 (patch) | |
tree | 21bd8958fbf6ae3c7195931876037fc174ea5ce7 /Documentation/core-api/xarray.rst | |
parent | 9c16bb88905456a9b1299338041f05fa7699971b (diff) | |
download | linux-84e5acb76dacb8ebd648a86a53907ce0dd616534.tar.gz linux-84e5acb76dacb8ebd648a86a53907ce0dd616534.tar.bz2 linux-84e5acb76dacb8ebd648a86a53907ce0dd616534.zip |
XArray: Add xa_store_bh() and xa_store_irq()
These convenience wrappers disable interrupts while taking the spinlock.
A number of drivers would otherwise have to open-code these functions.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'Documentation/core-api/xarray.rst')
-rw-r--r-- | Documentation/core-api/xarray.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/core-api/xarray.rst b/Documentation/core-api/xarray.rst index 65c77a81b689..8a6e2087de77 100644 --- a/Documentation/core-api/xarray.rst +++ b/Documentation/core-api/xarray.rst @@ -167,6 +167,8 @@ Takes RCU read lock: Takes xa_lock internally: * :c:func:`xa_store` + * :c:func:`xa_store_bh` + * :c:func:`xa_store_irq` * :c:func:`xa_insert` * :c:func:`xa_erase` * :c:func:`xa_erase_bh` @@ -247,7 +249,8 @@ Sharing the XArray with interrupt context is also possible, either using :c:func:`xa_lock_irqsave` in both the interrupt handler and process context, or :c:func:`xa_lock_irq` in process context and :c:func:`xa_lock` in the interrupt handler. Some of the more common patterns have helper -functions such as :c:func:`xa_erase_bh` and :c:func:`xa_erase_irq`. +functions such as :c:func:`xa_store_bh`, :c:func:`xa_store_irq`, +:c:func:`xa_erase_bh` and :c:func:`xa_erase_irq`. Sometimes you need to protect access to the XArray with a mutex because that lock sits above another mutex in the locking hierarchy. That does |