Commit a023030
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 f72ad05 commit a023030
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 | | |
| |||
1767 | 1764 | | |
1768 | 1765 | | |
1769 | 1766 | | |
1770 | | - | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
1771 | 1790 | | |
1772 | 1791 | | |
1773 | 1792 | | |
| |||
1787 | 1806 | | |
1788 | 1807 | | |
1789 | 1808 | | |
| 1809 | + | |
1790 | 1810 | | |
1791 | 1811 | | |
1792 | 1812 | | |
| |||
| 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