Sync to trunk head(r38096)
[reactos.git] / reactos / 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 };