pub fn new(stack: Stack, domain: ProtectionDomain) -> Self {
        // TODO
        let mut fdt = FileDescriptorTable::new();
        fdt.insert_lowest({
            let mut tmp = schemes()
                .read()
                .open_self(Box::new([]))
                .expect("self scheme");
            tmp.set_pre_open_path(Box::new(*b"."));
            tmp
        });

        Self {
            stack,
            heap: RwLock::new(LazilyMappedVma::dummy()),
            id: ThreadId::new(),
            static_wasm_data: Spinlock::new(None),
            domain,
            simd_state: SimdState::new(),
            status: Atomic::new(ThreadStatus::Runnable),
            file_descriptor_table: Spinlock::new(fdt),
            reply: ReplyPayloadTcb::new(),
            ipc_blocked_on: Atomic::new(SchemeId::sentinel()),
        }
    }
/// Creates a new thread from given parameters.
Creates a new thread from given parameters.
Creates a new thread from given parameters .
pub fn new(stack: Stack, domain: ProtectionDomain) -> Self {
        // TODO
        let mut fdt = FileDescriptorTable::new();
        fdt.insert_lowest({
            let mut tmp = schemes()
                .read()
                .open_self(Box::new([]))
                .expect("self scheme");
            tmp.set_pre_open_path(Box::new(*b"."));
            tmp
        });
        Self {
            stack,
            heap: RwLock::new(LazilyMappedVma::dummy()),
            id: ThreadId::new(),
            static_wasm_data: Spinlock::new(None),
            domain,
            simd_state: SimdState::new(),
            status: Atomic::new(ThreadStatus::Runnable),
            file_descriptor_table: Spinlock::new(fdt),
            reply: ReplyPayloadTcb::new(),
            ipc_blocked_on: Atomic::new(SchemeId::sentinel()),
        }
    }
pub fn new ( stack : Stack , domain : ProtectionDomain ) -> Self { // TODO let mut fdt = FileDescriptorTable :: new ( ) ; fdt . insert_lowest ( { let mut tmp = schemes ( ) . read ( ) . open_self ( Box :: new ( [ ] ) ) . expect ( " " ) ; tmp . set_pre_open_path ( Box :: new ( * b" " ) ) ; tmp } ) ; Self { stack , heap : RwLock :: new ( LazilyMappedVma :: dummy ( ) ) , id : ThreadId :: new ( ) , static_wasm_data : Spinlock :: new ( None ) , domain , simd_state : SimdState :: new ( ) , status : Atomic :: new ( ThreadStatus :: Runnable ) , file_descriptor_table : Spinlock :: new ( fdt ) , reply : ReplyPayloadTcb :: new ( ) , ipc_blocked_on : Atomic :: new ( SchemeId :: sentinel ( ) ) , } }
Creates a new thread from given parameters.
Creates a new thread from given parameters .
stack
Stack
domain
ProtectionDomain
stack
Stack
domain
ProtectionDomain