https://git.reactos.org/?p=reactos.git;a=commitdiff;h=adcae016c5ef76ed03a3b0...
commit adcae016c5ef76ed03a3b0b1fa3afd7b16f393ac Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Thu Jun 27 18:05:55 2019 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Thu Aug 15 18:04:57 2019 +0200
[NTOS:KE:I386] Fix parameter description for KiSwapContext --- ntoskrnl/ke/i386/ctxswitch.S | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/ntoskrnl/ke/i386/ctxswitch.S b/ntoskrnl/ke/i386/ctxswitch.S index 1151a021b14..b680195d19d 100644 --- a/ntoskrnl/ke/i386/ctxswitch.S +++ b/ntoskrnl/ke/i386/ctxswitch.S @@ -29,13 +29,10 @@ EXTERN _KeI386FxsrPresent:DWORD * \brief * The KiSwapContextInternal routine switches context to another thread. * - * BOOLEAN USERCALL KiSwapContextInternal(); + * BOOLEAN USERCALL KiSwapContextInternal(ULONG_PTR OldThreadAndApcFlag@<edx>); * - * Params: - * ESI - Pointer to the KTHREAD to which the caller wishes to - * switch to. - * EDI - Pointer to the KTHREAD to which the caller wishes to - * switch from. + * \param OldThreadAndApcFlag@<edx> + * Pointer to the current thread with the lowest bit set to the current IRQL. * * \returns * APC state. @@ -59,14 +56,14 @@ PUBLIC @KiSwapContextInternal@0 * The KiSwapContext routine switches context to another thread. * * BOOLEAN FASTCALL - * KiSwapContext(PKTHREAD CurrentThread, PKTHREAD TargetThread); + * KiSwapContext(KIRQL WaitIrql@<cl>, PKTHREAD CurrentThread@<edx>); * - * \param CurrentThread + * \param WaitIrql@<cl> + * The IRQL at which the wait happens. + * + * \param CurrentThread@<edx> * Pointer to the KTHREAD of the current thread. * - * \param TargetThread - * Pointer to the KTHREAD to which the caller wishes to switch to. - * * \returns * The WaitStatus of the Target Thread. * @@ -90,13 +87,13 @@ PUBLIC @KiSwapContext@8 mov [esp+4], edi mov [esp+0], ebp
- /* Get the wait IRQL */ + /* Combine current thread and the wait IRQL in edx */ or dl, cl
/* Do the swap with the registers correctly setup */ call @KiSwapContextInternal@0
- /* Return the registers */ + /* Restore the registers */ mov ebp, [esp+0] mov edi, [esp+4] mov esi, [esp+8]