reactos/include/ddk/fltsafe.h
Amine Khaldi 3ba7cea0e7 [DDK]
- d4drvif.h : Introduce pragma once, apply a consistent formatting, group related definitions and add several missing ones.
- d4iface.h : Introduce pragma once, apply a consistent formatting and group related definitions.
- dderror.h : Introduce pragma once and apply a consistent formatting.
- dxapi.h : Apply consistent formatting.
- fltsafe.h : Guard FLOATSAFE inside the proper NTDDI_VERSION and apply a consistent formatting.
- kbdmou.h : Introduce pragma once, apply a consistent formatting and add a missing wmidata.h inclusion.
- ntddmou.h : Move to PSDK, introduce pragma once, apply a consistent formatting and add several missing definitions.
[PSDK]
- ntddkbd.h : Introduce pragma once, apply a consistent formatting and add several missing definitions.

svn path=/branches/header-work/; revision=46889
2010-04-15 21:56:39 +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