public Process(Switch Ns, KProcessScheduler Scheduler, int ProcessId) { this.Ns = Ns; this.Scheduler = Scheduler; this.ProcessId = ProcessId; Memory = new AMemory(); ThreadArbiterList = new List <KThread>(); ThreadSyncLock = new object(); HandleTable = new KProcessHandleTable(); AppletState = new AppletStateMgr(); SvcHandler = new SvcHandler(Ns, this); TlsSlots = new ConcurrentDictionary <int, AThread>(); Threads = new ConcurrentDictionary <long, KThread>(); Executables = new List <Executable>(); ImageBase = MemoryRegions.AddrSpaceStart; MapRWMemRegion( MemoryRegions.TlsPagesAddress, MemoryRegions.TlsPagesSize, MemoryType.ThreadLocal); }
public Process(Switch Ns, KProcessScheduler Scheduler, int ProcessId, Npdm MetaData) { this.Ns = Ns; this.Scheduler = Scheduler; this.MetaData = MetaData; this.ProcessId = ProcessId; Memory = new AMemory(Ns.Memory.RamPointer); MemoryManager = new KMemoryManager(this); TlsPages = new List <KTlsPageManager>(); ThreadArbiterList = new List <KThread>(); ThreadSyncLock = new object(); HandleTable = new KProcessHandleTable(); AppletState = new AppletStateMgr(); SvcHandler = new SvcHandler(Ns, this); Threads = new ConcurrentDictionary <long, KThread>(); Executables = new List <Executable>(); ImageBase = MemoryManager.CodeRegionStart; }