Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 74 of file ldt.c.
{ KIRQL oldIrql; PUSHORT Gdt; DPRINT("KeSetBaseGdtSelector(Entry %x, Base %x)\n", Entry, Base); KeAcquireSpinLock(&GdtLock, &oldIrql); Gdt = (PUSHORT)KeGetPcr()->GDT; Entry = (Entry & (~0x3)) / 2; Gdt[Entry + 1] = (USHORT)(((ULONG)Base) & 0xffff); Gdt[Entry + 2] = Gdt[Entry + 2] & ~(0xff); Gdt[Entry + 2] = (USHORT)(Gdt[Entry + 2] | ((((ULONG)Base) & 0xff0000) >> 16)); Gdt[Entry + 3] = Gdt[Entry + 3] & ~(0xff00); Gdt[Entry + 3] = (USHORT)(Gdt[Entry + 3] | ((((ULONG)Base) & 0xff000000) >> 16)); DPRINT("%x %x %x %x\n", Gdt[Entry + 0], Gdt[Entry + 1], Gdt[Entry + 2], Gdt[Entry + 3]); KeReleaseSpinLock(&GdtLock, oldIrql); }