Commit 51cc3e6
rust: xarray: add
Add `Guard::{insert,reserve}` and `Guard::{insert,reserve}_limit`, which
are akin to `__xa_{alloc,insert}` in C.
Note that unlike `xa_reserve` which only ensures that memory is
allocated, the semantics of `Reservation` are stricter and require
precise management of the reservation. Indices which have been reserved
can still be overwritten with `Guard::store`, which allows for C-like
semantics if desired.
`__xa_cmpxchg_raw` is exported to facilitate the semantics described
above.
Signed-off-by: Tamir Duberstein <tamird@gmail.com>insert and reserve
1 parent 2bd6fb5 commit 51cc3e6
4 files changed
Lines changed: 447 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1738 | 1738 | | |
1739 | 1739 | | |
1740 | 1740 | | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | 1741 | | |
1745 | 1742 | | |
1746 | 1743 | | |
| |||
1764 | 1761 | | |
1765 | 1762 | | |
1766 | 1763 | | |
1767 | | - | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
1768 | 1787 | | |
1769 | 1788 | | |
1770 | 1789 | | |
| |||
1784 | 1803 | | |
1785 | 1804 | | |
1786 | 1805 | | |
| 1806 | + | |
1787 | 1807 | | |
1788 | 1808 | | |
1789 | 1809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
0 commit comments