[PSDK]
[reactos.git] / include / ddk / fltsafe.h
1 #if (NTDDI_VERSION >= NTDDI_WINXP)
2 struct FLOATSAFE {
3 KFLOATING_SAVE FloatSave;
4 NTSTATUS ntStatus;
5 FLOATSAFE::FLOATSAFE(void) {
6 ntStatus = KeSaveFloatingPointState(&FloatSave);
7 }
8 FLOATSAFE::~FLOATSAFE(void) {
9 if (NT_SUCCESS(ntStatus)) {
10 KeRestoreFloatingPointState(&FloatSave);
11 }
12 }
13 };
14 #endif