summaryrefslogtreecommitdiff
path: root/Documentation/core-api/xarray.rst
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-11-27 00:08:43 +0300
committerMatthew Wilcox <willy@infradead.org>2018-12-06 16:26:17 +0300
commit55f3f7eab75c10d9b33d122670b5935ab64db50f (patch)
tree6a601ac3c08993730dfade808fe6806e1bfbf98c /Documentation/core-api/xarray.rst
parenteff3860bbfedbac6edac57fb0d7f3a60e860c1c3 (diff)
downloadlinux-55f3f7eab75c10d9b33d122670b5935ab64db50f.tar.xz
XArray: Add xa_cmpxchg_irq and xa_cmpxchg_bh
These convenience wrappers match the other _irq and _bh wrappers we already have. It turns out I'd already open-coded xa_cmpxchg_irq() in the shmem code, so convert that. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'Documentation/core-api/xarray.rst')
-rw-r--r--Documentation/core-api/xarray.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/core-api/xarray.rst b/Documentation/core-api/xarray.rst
index dbe96cb5558e..6a6d67acaf69 100644
--- a/Documentation/core-api/xarray.rst
+++ b/Documentation/core-api/xarray.rst
@@ -187,6 +187,8 @@ Takes xa_lock internally:
* :c:func:`xa_erase_bh`
* :c:func:`xa_erase_irq`
* :c:func:`xa_cmpxchg`
+ * :c:func:`xa_cmpxchg_bh`
+ * :c:func:`xa_cmpxchg_irq`
* :c:func:`xa_store_range`
* :c:func:`xa_alloc`
* :c:func:`xa_alloc_bh`
@@ -263,7 +265,8 @@ 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_store_bh`, :c:func:`xa_store_irq`,
-:c:func:`xa_erase_bh` and :c:func:`xa_erase_irq`.
+:c:func:`xa_erase_bh`, :c:func:`xa_erase_irq`, :c:func:`xa_cmpxchg_bh`
+and :c:func:`xa_cmpxchg_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