mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
- On SMP systems, update KPROCESS->ActiveProcessors and assert their validty. Needed for a similar assertion and check in KiSwapProcess which we already have.
- Also on SMP, make sure to clear the KTHREAD's swap-busy lock after the actual swap has been done. svn path=/trunk/; revision=24185
This commit is contained in:
@@ -361,6 +361,21 @@ StackOk:
|
||||
cmp ebp, eax
|
||||
jz SameProcess
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Get the active processors and XOR with the process' */
|
||||
mov ecx, [ebx+KPCR_SET_MEMBER_COPY]
|
||||
lock xor [ebp+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
|
||||
/* Assert change went ok */
|
||||
#ifdef DBG
|
||||
test [ebp+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
jz WrongActiveCpu
|
||||
test [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
jz WrongActiveCpu
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Check if we need an LDT */
|
||||
mov ecx, [ebp+KPROCESS_LDT_DESCRIPTOR0]
|
||||
or ecx, [eax+KPROCESS_LDT_DESCRIPTOR0]
|
||||
@@ -372,6 +387,12 @@ UpdateCr3:
|
||||
mov cr3, eax
|
||||
|
||||
SameProcess:
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Release swap lock */
|
||||
and byte ptr [edi+KTHREAD_SWAP_BUSY], 0
|
||||
#endif
|
||||
|
||||
/* Clear gs */
|
||||
xor eax, eax
|
||||
mov gs, ax
|
||||
|
||||
Reference in New Issue
Block a user