///////////////////////////////////// // PUBLIC STATIC METHODS ///////////////////////////////////// internal static void Initialize() { tableLock = new SmartSpinlock(SpinLock.Types.ProtectionDomainTable); PdTable = new ProtectionDomain[maxPDs]; PdIndexGenerator = 1; // Create the default protection domain AddressSpace defaultSpace = VMManager.GetBootstrapSpace(); PdTable[0] = new ProtectionDomain(defaultSpace, "Default", true); }
private ProtectionDomain(AddressSpace space, string name, bool isKernelDomain) { this.space = space; this.name = name; this.kernelMode = isKernelDomain; this.initSpin = new SmartSpinlock(SpinLock.Types.ProtectionDomainInit); this.userMappingLock = new SmartSpinlock(SpinLock.Types.ProtectionDomainMapping); this.refCount = 1; // represents the table entry #if VERBOSE DebugStub.WriteLine("Created protection domain \"{0}\"", __arglist(name)); #endif }