Lines Matching full:an
12 The XArray is an abstract data type which behaves like a very large array
32 objects, as long as those objects have an alignment of at least 4.
35 You must first convert it into an entry using xa_mk_value().
36 When you retrieve an entry from the XArray, you can check whether it is
38 an integer by calling xa_to_value().
41 call xa_tag_pointer() to create an entry with a tag, xa_untag_pointer()
42 to turn a tagged entry back into an untagged pointer and xa_pointer_tag()
43 to retrieve the tag of an entry. Tagged pointers use the same bits that
51 An unusual feature of the XArray is the ability to create entries which
61 Start by initialising an XArray, either with DEFINE_XARRAY()
70 ``NULL`` entry. There is no difference between an entry that has never
74 You can conditionally replace an entry at an index by using
80 If you want to only store a new entry to an index if the current entry
110 Finally, you can remove all entries from an XArray by calling
122 You can enquire whether a mark is set on an entry by using
124 by using xa_set_mark() and remove the mark from an entry by calling
126 particular mark set by calling xa_marked(). Erasing an entry from the
147 You can call xa_alloc() to store the entry at an unused index
155 To free an entry, use xa_erase() (or xa_release() if
164 You cannot use ``XA_MARK_0`` with an allocating XArray as this mark
165 is used to track whether an entry is free or not. The other marks are
179 special value which can be turned into an errno using xa_err().
187 The XArray uses RCU and an internal spinlock to synchronise access:
242 avoid dereferencing freed memory, but an explanation of that is beyond
301 available for situations where you look up an entry and want to atomically
309 cost of an interface which can be harder to use and has fewer safeguards.
317 The advanced API is based around the xa_state. This is an opaque data
330 the xa_state is in an error state before proceeding, so there's no need
331 for you to check for an error after each call; you can make multiple
337 If the xa_state is holding an ``ENOMEM`` error, calling xas_nomem()
366 - An XArray node. May be visible when using a multi-index xa_state.
383 an entry in the XArray which can be used to reserve the index for
397 You can use xas_init_marks() to reset the marks on an entry
419 if the cursor has been walked to an entry, then it will find the next
436 is in an appropriate state to continue the iteration after the entry
468 meaningful, potentially being an internal entry or ``NULL`` even when there
469 is an entry stored within the range. Calling xas_find_conflict()
475 in the xa_state will not be changed. When iterating over an XArray