pub fn init_syscallbuf_fds_disabled(&self, t: &mut dyn Task) {
        if !t.session().is_recording() {
            return;
        }

        let rt = t.as_record_task_mut().unwrap();

        ed_assert!(&rt, self.task_set().has(rt.weak_self_ptr()));

        let preload_globals = match rt.preload_globals {
            None => return,
            Some(pr) => pr,
        };

        let mut disabled: [u8; SYSCALLBUF_FDS_DISABLED_SIZE as usize] =
            [0u8; SYSCALLBUF_FDS_DISABLED_SIZE as usize];

        // It's possible that some tasks in this address space have a different
        // FdTable. We need to disable syscallbuf for an fd if any tasks for this
        // address space are monitoring the fd.
        for vm_t in rt.vm().task_set().iter() {
            for &fd in vm_t.borrow().fd_table().fds.keys() {
                debug_assert!(fd >= 0);
                let mut adjusted_fd = fd;
                if fd >= SYSCALLBUF_FDS_DISABLED_SIZE {
                    adjusted_fd = SYSCALLBUF_FDS_DISABLED_SIZE - 1;
                }
                disabled[adjusted_fd as usize] = 1;
            }
        }

        let addr: RemotePtr<u8> =
            RemotePtr::cast(preload_globals) + offset_of!(preload_globals, syscallbuf_fds_disabled);
        rt.write_bytes(addr, &disabled);
        rt.record_local(addr, &disabled);
    }
/// Regenerate syscallbuf_fds_disabled in task `t`.
/// Called during initialization of the preload library.
Regenerate syscallbuf_fds_disabled in task `t`.
Called during initialization of the preload library.
Regenerate syscallbuf_fds_disabled in task ` t ` . Called during initialization of the preload library .
pub fn init_syscallbuf_fds_disabled(&self, t: &mut dyn Task) {
        if !t.session().is_recording() {
            return;
        }
        let rt = t.as_record_task_mut().unwrap();
        ed_assert!(&rt, self.task_set().has(rt.weak_self_ptr()));
        let preload_globals = match rt.preload_globals {
            None => return,
            Some(pr) => pr,
        };
        let mut disabled: [u8; SYSCALLBUF_FDS_DISABLED_SIZE as usize] =
            [0u8; SYSCALLBUF_FDS_DISABLED_SIZE as usize];
        // It's possible that some tasks in this address space have a different
        // FdTable. We need to disable syscallbuf for an fd if any tasks for this
        // address space are monitoring the fd.
        for vm_t in rt.vm().task_set().iter() {
            for &fd in vm_t.borrow().fd_table().fds.keys() {
                debug_assert!(fd >= 0);
                let mut adjusted_fd = fd;
                if fd >= SYSCALLBUF_FDS_DISABLED_SIZE {
                    adjusted_fd = SYSCALLBUF_FDS_DISABLED_SIZE - 1;
                }
                disabled[adjusted_fd as usize] = 1;
            }
        }
        let addr: RemotePtr<u8> =
            RemotePtr::cast(preload_globals) + offset_of!(preload_globals, syscallbuf_fds_disabled);
        rt.write_bytes(addr, &disabled);
        rt.record_local(addr, &disabled);
    }
pub fn init_syscallbuf_fds_disabled ( & self , t : & mut dyn Task ) { if ! t . session ( ) . is_recording ( ) { return ; } let rt = t . as_record_task_mut ( ) . unwrap ( ) ; ed_assert ! ( rt self task_set ( ) has ( rt weak_self_ptr ( ) ) ) ; let preload_globals = match rt . preload_globals { None => return , Some ( pr ) => pr , } ; let mut disabled : [ u8 ; SYSCALLBUF_FDS_DISABLED_SIZE as usize ] = [ 0u8 ; SYSCALLBUF_FDS_DISABLED_SIZE as usize ] ; // It's possible that some tasks in this address space have a different // FdTable. We need to disable syscallbuf for an fd if any tasks for this // address space are monitoring the fd. for vm_t in rt . vm ( ) . task_set ( ) . iter ( ) { for & fd in vm_t . borrow ( ) . fd_table ( ) . fds . keys ( ) { debug_assert ! ( fd 0 ) ; let mut adjusted_fd = fd ; if fd >= SYSCALLBUF_FDS_DISABLED_SIZE { adjusted_fd = SYSCALLBUF_FDS_DISABLED_SIZE - 1 ; } disabled [ adjusted_fd as usize ] = 1 ; } } let addr : RemotePtr < u8 > = RemotePtr :: cast ( preload_globals ) + offset_of ! ( preload_globals syscallbuf_fds_disabled ) ; rt . write_bytes ( addr , & disabled ) ; rt . record_local ( addr , & disabled ) ; }
Regenerate syscallbuf_fds_disabled in task `t`.
Regenerate syscallbuf_fds_disabled in task ` t ` .
&self
t
&mut dyn Task