VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Tcdefs.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-04 02:05:11 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-04 02:26:24 +0200
commit89efcdb8cd95ea798187fe4062a73fa5d2fca456 (patch)
tree5b87e340ffc7fb6ad8a8859750aa388487188f8f /src/Common/Tcdefs.h
parentc2f6190627de27903264258c6ea8ee72199c0c81 (diff)
downloadVeraCrypt-89efcdb8cd95ea798187fe4062a73fa5d2fca456.tar.gz
VeraCrypt-89efcdb8cd95ea798187fe4062a73fa5d2fca456.zip
Windows Driver: correctly save and restore extended processor state when performing AVX operations on Windows 7 and later. Enhance readability of code handling save/restore of floating point state.
Diffstat (limited to 'src/Common/Tcdefs.h')
-rw-r--r--src/Common/Tcdefs.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h
index f56cdc9b..e7f54d8e 100644
--- a/src/Common/Tcdefs.h
+++ b/src/Common/Tcdefs.h
@@ -260,6 +260,26 @@ typedef int BOOL;
#define FALSE !TRUE
#endif
+typedef NTSTATUS (NTAPI *KeSaveExtendedProcessorStateFn) (
+ __in ULONG64 Mask,
+ PXSTATE_SAVE XStateSave
+ );
+
+
+typedef VOID (NTAPI *KeRestoreExtendedProcessorStateFn) (
+ PXSTATE_SAVE XStateSave
+ );
+
+extern NTSTATUS NTAPI KeSaveExtendedProcessorState (
+ __in ULONG64 Mask,
+ PXSTATE_SAVE XStateSave
+ );
+
+
+extern VOID NTAPI KeRestoreExtendedProcessorState (
+ PXSTATE_SAVE XStateSave
+ );
+
#else /* !TC_WINDOWS_DRIVER */
#if !defined(_UEFI)
#define TCalloc malloc