Skip to content

Commit 5aa86e4

Browse files
bors[bot]mkroening
andauthored
Merge #653
653: Migrate to upstream pflock r=stlankes a=mkroening Co-authored-by: Martin Kröning <mkroening@posteo.net>
2 parents 79dbb23 + 40b91f0 commit 5aa86e4

File tree

5 files changed

+13
-129
lines changed

5 files changed

+13
-129
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ include-transformed = { version = "0.2", optional = true }
8080
linked_list_allocator = { version = "0.10", default-features = false }
8181
log = { version = "0.4", default-features = false }
8282
pci-ids = { version = "0.2", optional = true }
83+
pflock = "0.2"
8384
shell-words = { version = "1.1", default-features = false }
8485
qemu-exit = "3.0"
8586
rand_chacha = { version = "0.3", default-features = false }

src/fd/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use crate::env;
1313
use crate::errno::*;
1414
use crate::fd::file::{GenericFile, UhyveFile};
1515
use crate::fd::stdio::*;
16-
use crate::synch::rwlock::RWLock;
1716
use crate::syscalls::fs::{self, FilePerms};
1817
#[cfg(all(feature = "tcp", not(feature = "newlib")))]
1918
use crate::syscalls::net::*;
@@ -36,8 +35,8 @@ const STDERR_FILENO: FileDescriptor = 2;
3635
pub(crate) type FileDescriptor = i32;
3736

3837
/// Mapping between file descriptor and the referenced object
39-
static OBJECT_MAP: RWLock<HashMap<FileDescriptor, Arc<dyn ObjectInterface>, RandomState>> =
40-
RWLock::new(HashMap::<
38+
static OBJECT_MAP: pflock::PFLock<HashMap<FileDescriptor, Arc<dyn ObjectInterface>, RandomState>> =
39+
pflock::PFLock::new(HashMap::<
4140
FileDescriptor,
4241
Arc<dyn ObjectInterface>,
4342
RandomState,

src/synch/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
33
pub mod futex;
44
pub mod recmutex;
5-
pub mod rwlock;
65
pub mod semaphore;

src/synch/rwlock.rs

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)