19dfc00ab571f7c46f3ab3312055a4c49eb97553
[reactos.git] / include / ddk / fltsafe.h
1
2 struct FLOATSAFE
3 {
4 KFLOATING_SAVE FloatSave;
5 NTSTATUS ntStatus;
6
7 FLOATSAFE::FLOATSAFE(void)
8 {
9 ntStatus = KeSaveFloatingPointState(&FloatSave);
10 }
11
12 FLOATSAFE::~FLOATSAFE(void)
13 {
14 if (NT_SUCCESS(ntStatus))
15 {
16 KeRestoreFloatingPointState(&FloatSave);
17 }
18 }
19 };