VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Exception.h
AgeCommit message (Collapse)AuthorFilesLines
2017-06-23Update IDRIX copyright yearMounir IDRASSI1-1/+1
2016-05-10Remove trailing whitespaceDavid Foerster1-1/+1
2016-05-10Normalize all line terminatorsDavid Foerster1-123/+123
2016-02-07Windows:Fix various issues and warnings reported by static code analysis ↵Mounir IDRASSI1-2/+2
tool Coverity.
2016-01-20Copyright: update dates to include 2016.Mounir IDRASSI1-1/+1
2015-11-262015-07-06Windows: Display source location of errors in order to help diagnose issues ↵Mounir IDRASSI1-9/+14
reported by users
2015-04-06Windows vulnerability fix: CryptAcquireContext vulnerability fix. Add checks ↵Mounir IDRASSI1-0/+33
to random generator to abort in case of error and display a diagnose message to the user.
2014-12-27Windows: use the correct window handle for creating message boxes. This ↵Mounir IDRASSI1-3/+3
became important after the introduction of the wait dialog in order to avoid having message boxes behind the wait dialog.
2014-11-08Static Code Analysis : Correctly initialize member variables in various ↵Mounir IDRASSI1-2/+2
constructors
2014-11-08Change namespace from TrueCrypt to VeraCrypt. Rename method from Resources ↵Mounir IDRASSI1-1/+1
Resources::GetTrueCryptIcon to Resources::GetVeraCryptIcon.
2014-11-08Modifications to remove all TrueCrypt references in names. generate new ↵Mounir IDRASSI1-1/+1
GUIDs for VeraCrypt. Replace "TRUE" by "VERA" in volume headers and driver magic word.
2014-11-08Add original TrueCrypt 7.1a sourcesMounir IDRASSI1-0/+81
rom source code of TrueCrypt 7.1a, which is 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) and all other portions of this file are Copyright (c) 2013-2017 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 code distribution packages. */ #include "Platform/Exception.h" #include "Platform/SyncEvent.h" #include "Platform/SystemException.h" namespace VeraCrypt { SyncEvent::SyncEvent () { int status = pthread_cond_init (&SystemSyncEvent, nullptr); if (status != 0) throw SystemException (SRC_POS, status); Signaled = false; Initialized = true; } SyncEvent::~SyncEvent () { #ifdef DEBUG int status = #endif pthread_cond_destroy (&SystemSyncEvent); #ifdef DEBUG if (status != 0) SystemLog::WriteException (SystemException (SRC_POS, status)); #endif Initialized = false; } void SyncEvent::Signal () { assert (Initialized); ScopeLock lock (EventMutex); Signaled = true; int status = pthread_cond_signal (&SystemSyncEvent); if (status != 0) throw SystemException (SRC_POS, status); } void SyncEvent::Wait () { assert (Initialized); ScopeLock lock (EventMutex); while (!Signaled) { int status = pthread_cond_wait (&SystemSyncEvent, EventMutex.GetSystemHandle()); if (status != 0) throw SystemException (SRC_POS, status); } Signaled = false; } }