Lines Matching +full:multi +full:-
1 .. SPDX-License-Identifier: GPL-2.0+
15 next or previous entry in a cache-efficient manner. In contrast to a
17 order to grow the array. It is more memory-efficient, parallelisable
18 and cache friendly than a doubly-linked list. It takes advantage of
28 Normal pointers may be stored in the XArray directly. They must be 4-byte
30 alloc_page(). It isn't true for arbitrary user-space pointers,
54 the range. Storing to any index will store to all of them. Multi-index
63 allocated ones. A freshly-initialised XArray contains a ``NULL``
82 returns ``-EBUSY`` if the entry is not empty.
116 ------------
129 Setting or clearing a mark on any index of a multi-index entry will
141 ------------------
169 -----------------
184 -------
254 xa_init_flags(&foo->array, XA_FLAGS_LOCK_BH);
261 xa_lock_bh(&foo->array);
262 err = xa_err(__xa_store(&foo->array, index, entry, GFP_KERNEL));
264 foo->count++;
265 xa_unlock_bh(&foo->array);
272 xa_lock(&foo->array);
273 __xa_erase(&foo->array, index);
274 foo->count--;
275 xa_unlock(&foo->array);
312 to use the xa_lock or the RCU lock while doing read-only operations on
315 advanced API is only available to modules with a GPL-compatible license.
346 ----------------
353 .. flat-table::
356 * - Name
357 - Test
358 - Usage
360 * - Node
361 - xa_is_node()
362 - An XArray node. May be visible when using a multi-index xa_state.
364 * - Sibling
365 - xa_is_sibling()
366 - A non-canonical entry for a multi-index entry. The value indicates
369 * - Retry
370 - xa_is_retry()
371 - This entry is currently being modified by a thread which has the
376 * - Zero
377 - xa_is_zero()
378 - Zero entries appear as ``NULL`` through the Normal API, but occupy
387 ------------------------
447 Multi-Index Entries
448 -------------------
456 eg indices 64-127 may be tied together, but 2-6 may not be. This may
460 You can create a multi-index entry by using XA_STATE_ORDER()
462 Calling xas_load() with a multi-index xa_state will walk the
470 If xas_load() encounters a multi-index entry, the xa_index
473 of a multi-index entry, it will not be altered. Subsequent calls
478 Using xas_next() or xas_prev() with a multi-index xa_state is not
479 supported. Using either of these functions on a multi-index entry will
482 Storing ``NULL`` into any index of a multi-index entry will set the
483 entry at every index to ``NULL`` and dissolve the tie. A multi-index
491 .. kernel-doc:: include/linux/xarray.h
492 .. kernel-doc:: lib/xarray.c