diff options
author | Chuyan Zhang <me@zcy.moe> | 2023-11-30 12:01:11 -0800 |
---|---|---|
committer | Chuyan Zhang <me@zcy.moe> | 2023-11-30 12:01:11 -0800 |
commit | fd125947c9db0b33761414e65e919f73d9bf1815 (patch) | |
tree | c4c66d95ba85601427928aa7f23659590055d464 /ayafs/src/memory/file_handle.rs | |
parent | 1eac97eea4ec0bcef0be061a2cba93a584355283 (diff) | |
download | myfs-fd125947c9db0b33761414e65e919f73d9bf1815.tar.gz myfs-fd125947c9db0b33761414e65e919f73d9bf1815.zip |
Refactor workspace
Diffstat (limited to 'ayafs/src/memory/file_handle.rs')
-rw-r--r-- | ayafs/src/memory/file_handle.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/ayafs/src/memory/file_handle.rs b/ayafs/src/memory/file_handle.rs deleted file mode 100644 index c821619..0000000 --- a/ayafs/src/memory/file_handle.rs +++ /dev/null @@ -1,15 +0,0 @@ -use crate::AyaFS; -use std::sync::atomic::Ordering; - -impl AyaFS { - pub(crate) fn allocate_file_descriptor( - &mut self, - inode_index: usize, - read: bool, - write: bool, - ) -> u64 { - let fd = self.next_file_handle.fetch_add(1, Ordering::SeqCst); - self.file_handle_map.insert(fd, (inode_index, read, write)); - fd - } -} |