ReactOS  0.4.15-dev-5455-g015cd25
KeFloatPointState.c File Reference
#include <kmt_test.h>
Include dependency graph for KeFloatPointState.c:

Go to the source code of this file.

Functions

 START_TEST (KeFloatPointState)
 

Function Documentation

◆ START_TEST()

START_TEST ( KeFloatPointState  )

Definition at line 10 of file KeFloatPointState.c.

11 {
13  KFLOATING_SAVE FloatSave;
14  KIRQL Irql;
15 
16  /* Save the state under normal conditions */
17  Status = KeSaveFloatingPointState(&FloatSave);
18  ok_irql(PASSIVE_LEVEL);
20 
21  /* Restore the FPU state back */
22  KeRestoreFloatingPointState(&FloatSave);
23 
24  /* Try to raise the IRQL to APC and do some operations again */
26 
27  /* Save the state under APC_LEVEL interrupt */
28  Status = KeSaveFloatingPointState(&FloatSave);
29  ok_irql(APC_LEVEL);
31 
32  /* Restore the FPU state back */
33  KeRestoreFloatingPointState(&FloatSave);
34 
35  /* Try to raise the IRQL to dispatch this time */
38 
39  /* Save the state under DISPATCH_LEVEL interrupt */
40  Status = KeSaveFloatingPointState(&FloatSave);
41  ok_irql(DISPATCH_LEVEL);
43 
44  /* We're done */
45  KeRestoreFloatingPointState(&FloatSave);
47 }
LONG NTSTATUS
Definition: precomp.h:26
_Out_ PKIRQL Irql
Definition: csq.h:179
NTSTATUS NTAPI KeRestoreFloatingPointState(_In_ PKFLOATING_SAVE Save)
Restores the original FPU state context that has been saved by a API call of KeSaveFloatingPointState...
Definition: cpu.c:1469
UCHAR KIRQL
Definition: env_spec_w32.h:591
Status
Definition: gdiplustypes.h:24
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
NTSTATUS NTAPI KeSaveFloatingPointState(_Out_ PKFLOATING_SAVE Save)
Saves the current floating point unit state context of the current calling thread.
Definition: cpu.c:1343
VOID NTAPI KeRaiseIrql(KIRQL NewIrql, PKIRQL OldIrql)
Definition: spinlock.c:27
#define STATUS_SUCCESS
Definition: shellext.h:65
VOID NTAPI KeLowerIrql(KIRQL NewIrql)
Definition: spinlock.c:39
#define ok_eq_hex(value, expected)
Definition: NtContinue.c:18
#define APC_LEVEL
Definition: env_spec_w32.h:695