reactos/include/ddk/fltsafe.h
Hermès Bélusca-Maïto b819608ed8 Create a branch for console restructuration work.
svn path=/branches/condrv_restructure/; revision=63104
2014-05-02 14:13:40 +00:00

15 lines
322 B
C

#if (NTDDI_VERSION >= NTDDI_WINXP)
struct FLOATSAFE {
KFLOATING_SAVE FloatSave;
NTSTATUS ntStatus;
FLOATSAFE::FLOATSAFE(void) {
ntStatus = KeSaveFloatingPointState(&FloatSave);
}
FLOATSAFE::~FLOATSAFE(void) {
if (NT_SUCCESS(ntStatus)) {
KeRestoreFloatingPointState(&FloatSave);
}
}
};
#endif