VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/EncryptionThreadPool.c
diff options
context:
space:
mode:
authorDavid Foerster <david.foerster@informatik.hu-berlin.de>2016-05-10 22:16:32 +0200
committerDavid Foerster <david.foerster@informatik.hu-berlin.de>2016-05-10 22:18:34 +0200
commit11716ed2dacbb104f8f59867fe66f2c0a6984291 (patch)
tree28aa448de2e790d0f40dc57799a55a9df12ee6fb /src/Common/EncryptionThreadPool.c
parent191075155835172e5596e191cf0679ff9022f0fd (diff)
downloadVeraCrypt-11716ed2dacbb104f8f59867fe66f2c0a6984291.tar.gz
VeraCrypt-11716ed2dacbb104f8f59867fe66f2c0a6984291.zip
Remove trailing whitespace
Diffstat (limited to 'src/Common/EncryptionThreadPool.c')
-rw-r--r--src/Common/EncryptionThreadPool.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Common/EncryptionThreadPool.c b/src/Common/EncryptionThreadPool.c
index 9cc641cc..f0889a34 100644
--- a/src/Common/EncryptionThreadPool.c
+++ b/src/Common/EncryptionThreadPool.c
@@ -3,7 +3,7 @@
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
- Modifications and additions to the original source code (contained in this file)
+ Modifications and additions to the original source code (contained in this file)
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
@@ -182,13 +182,13 @@ static TC_THREAD_PROC EncryptionThreadProc (void *threadArg)
workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize());
break;
- default:
+ default:
TC_THROW_FATAL_EXCEPTION;
- }
+ }
InterlockedExchange (workItem->KeyDerivation.CompletionFlag, TRUE);
TC_SET_EVENT (*workItem->KeyDerivation.CompletionEvent);
-
+
if (InterlockedDecrement (workItem->KeyDerivation.OutstandingWorkItemCount) == 0)
TC_SET_EVENT (*workItem->KeyDerivation.NoOutstandingWorkItemEvent);
@@ -256,12 +256,12 @@ BOOL EncryptionThreadPoolStart (size_t encryptionFreeCpuCount)
WorkItemReadyEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
if (!WorkItemReadyEvent)
return FALSE;
-
+
WorkItemCompletedEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
if (!WorkItemCompletedEvent)
return FALSE;
#endif
-
+
#ifdef DEVICE_DRIVER
ExInitializeFastMutex (&DequeueMutex);
ExInitializeFastMutex (&EnqueueMutex);
@@ -400,10 +400,10 @@ void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data,
EncryptionThreadPoolWorkItem *workItem;
EncryptionThreadPoolWorkItem *firstFragmentWorkItem;
-
+
if (unitCount == 0)
return;
-
+
if (!ThreadPoolRunning || unitCount == 1)
{
switch (type)
@@ -432,7 +432,7 @@ void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data,
else
{
/* Note that it is not efficient to divide the data into fragments smaller than a few hundred bytes.
- The reason is that the overhead associated with thread handling would in most cases make a multi-threaded
+ The reason is that the overhead associated with thread handling would in most cases make a multi-threaded
process actually slower than a single-threaded process. */
fragmentCount = ThreadCount;
@@ -442,7 +442,7 @@ void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data,
if (remainder > 0)
++unitsPerFragment;
}
-
+
fragmentData = data;
fragmentStartUnitNo = startUnitNo->Value;