reactos/include/ddk/fltsafe.h
KJK::Hyperion c0fa485960 The real, definitive, Visual C++ support branch. Accept no substitutes
svn path=/branches/the-real-msvc/; revision=36960
2008-10-25 17:56:00 +00:00

20 lines
324 B
C

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