VOID NTAPI KiSwapProcess(IN PKPROCESS NewProcess, IN PKPROCESS OldProcess) { PKIPCR Pcr = (PKIPCR)KeGetPcr(); #ifdef CONFIG_SMP LONG SetMember; /* Update active processor mask */ SetMember = (LONG)Pcr->SetMember; InterlockedXor((PLONG)&NewProcess->ActiveProcessors, SetMember); InterlockedXor((PLONG)&OldProcess->ActiveProcessors, SetMember); #endif /* Check for new LDT */ if (NewProcess->LdtDescriptor.LimitLow != OldProcess->LdtDescriptor.LimitLow) { /* Not handled yet */ UNIMPLEMENTED_DBGBREAK(); return; } /* Update CR3 */ __writecr3(NewProcess->DirectoryTableBase[0]); /* Clear GS */ Ke386SetGs(0); /* Update IOPM offset */ Pcr->TSS->IoMapBase = NewProcess->IopmOffset; }
gsize (g_atomic_pointer_xor) (volatile void *atomic, gsize val) { #if GLIB_SIZEOF_VOID_P == 8 return InterlockedXor64 (atomic, val); #else return InterlockedXor (atomic, val); #endif }
guint (g_atomic_int_xor) (volatile guint *atomic, guint val) { return InterlockedXor (atomic, val); }