File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
## [ Unreleased]
3
3
4
+ ## [ v0.6.0]
5
+
4
6
### Added
5
7
6
8
- [[ #160 ]] ( https://github.com/rust-vmm/vm-memory/pull/160 ) : Add ` ArcRef ` and ` AtomicBitmapArc ` bitmap
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " vm-memory"
3
- version = " 0.5 .0"
3
+ version = " 0.6 .0"
4
4
description = " Safe abstractions for accessing the VM physical memory"
5
5
keywords = [" memory" ]
6
+ categories = [" memory-management" ]
6
7
authors = [" Liu Jiang <gerry@linux.alibaba.com>" ]
7
8
repository = " https://github.com/rust-vmm/vm-memory"
8
9
readme = " README.md"
Original file line number Diff line number Diff line change @@ -1563,9 +1563,12 @@ mod tests {
1563
1563
let a = VecMem :: new ( 1 ) ;
1564
1564
let a_clone = a. clone ( ) ;
1565
1565
let v_ref = a. get_ref :: < u8 > ( 0 ) . unwrap ( ) ;
1566
+ let barrier = Arc :: new ( Barrier :: new ( 2 ) ) ;
1567
+ let barrier1 = barrier. clone ( ) ;
1568
+
1566
1569
v_ref. store ( 99 ) ;
1567
1570
spawn ( move || {
1568
- sleep ( Duration :: from_millis ( 10 ) ) ;
1571
+ barrier1 . wait ( ) ;
1569
1572
let clone_v_ref = a_clone. get_ref :: < u8 > ( 0 ) . unwrap ( ) ;
1570
1573
clone_v_ref. store ( 0 ) ;
1571
1574
} ) ;
@@ -1574,6 +1577,7 @@ mod tests {
1574
1577
// somehow and this helps to ensure the sleep actually happens before the store rather then
1575
1578
// being reordered by the compiler.
1576
1579
assert_eq ! ( v_ref. load( ) , 99 ) ;
1580
+ barrier. wait ( ) ;
1577
1581
1578
1582
// Granted we could have a machine that manages to perform this many volatile loads in the
1579
1583
// amount of time the spawned thread sleeps, but the most likely reason the retry limit will
You can’t perform that action at this time.
0 commit comments