pub fn did_dup(&mut self, from: i32, to: i32, active_task: &mut dyn Task) {
        if self.fds.contains_key(&from) {
            if to >= SYSCALLBUF_FDS_DISABLED_SIZE && !self.fds.contains_key(&to) {
                self.fd_count_beyond_limit += 1;
            }
            self.fds.insert(to, self.fds[&from].clone());
        } else {
            if to >= SYSCALLBUF_FDS_DISABLED_SIZE && self.fds.contains_key(&to) {
                self.fd_count_beyond_limit -= 1;
            }
            self.fds.remove(&to);
        }
        self.update_syscallbuf_fds_disabled(to, active_task);
    }
/// DIFF NOTE: Additional param `active_task` to solve borrow issues.
DIFF NOTE: Additional param `active_task` to solve borrow issues.
DIFF NOTE : Additional param ` active_task ` to solve borrow issues .
pub fn did_dup(&mut self, from: i32, to: i32, active_task: &mut dyn Task) {
        if self.fds.contains_key(&from) {
            if to >= SYSCALLBUF_FDS_DISABLED_SIZE && !self.fds.contains_key(&to) {
                self.fd_count_beyond_limit += 1;
            }
            self.fds.insert(to, self.fds[&from].clone());
        } else {
            if to >= SYSCALLBUF_FDS_DISABLED_SIZE && self.fds.contains_key(&to) {
                self.fd_count_beyond_limit -= 1;
            }
            self.fds.remove(&to);
        }
        self.update_syscallbuf_fds_disabled(to, active_task);
    }
pub fn did_dup ( & mut self , from : i32 , to : i32 , active_task : & mut dyn Task ) { if self . fds . contains_key ( & from ) { if to >= SYSCALLBUF_FDS_DISABLED_SIZE && ! self . fds . contains_key ( & to ) { self . fd_count_beyond_limit += 1 ; } self . fds . insert ( to , self . fds [ & from ] . clone ( ) ) ; } else { if to >= SYSCALLBUF_FDS_DISABLED_SIZE && self . fds . contains_key ( & to ) { self . fd_count_beyond_limit -= 1 ; } self . fds . remove ( & to ) ; } self . update_syscallbuf_fds_disabled ( to , active_task ) ; }
DIFF NOTE: Additional param `active_task` to solve borrow issues.
DIFF NOTE : Additional param ` active_task ` to solve borrow issues .
&mut self
from
i32
to
i32
active_task
&mut dyn Task