summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-11-05 16:37:15 -0500
committerMatthew Wilcox <willy@infradead.org>2018-11-05 16:38:10 -0500
commit804dfaf01bcc9daa4298c608ba9018abf616ec48 (patch)
tree6980e540f3043fb47016c3ff6259caaee44bb689 /Documentation
parentd9c480435add8257f9069941f0e6196647f6d746 (diff)
XArray: Fix Documentation
Minor fixes. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/core-api/xarray.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/core-api/xarray.rst b/Documentation/core-api/xarray.rst
index 616ac406bf86..dbe96cb5558e 100644
--- a/Documentation/core-api/xarray.rst
+++ b/Documentation/core-api/xarray.rst
@@ -74,7 +74,8 @@ using :c:func:`xa_load`. xa_store will overwrite any entry with the
new entry and return the previous entry stored at that index. You can
use :c:func:`xa_erase` instead of calling :c:func:`xa_store` with a
``NULL`` entry. There is no difference between an entry that has never
-been stored to and one that has most recently had ``NULL`` stored to it.
+been stored to, one that has been erased and one that has most recently
+had ``NULL`` stored to it.
You can conditionally replace an entry at an index by using
:c:func:`xa_cmpxchg`. Like :c:func:`cmpxchg`, it will only succeed if
@@ -114,6 +115,9 @@ unused entry. If another user has stored to the entry in the meantime,
:c:func:`xa_release` will do nothing; if instead you want the entry to
become ``NULL``, you should use :c:func:`xa_erase`.
+If all entries in the array are ``NULL``, the :c:func:`xa_empty` function
+will return ``true``.
+
Finally, you can remove all entries from an XArray by calling
:c:func:`xa_destroy`. If the XArray entries are pointers, you may wish
to free the entries first. You can do this by iterating over all present