aboutsummaryrefslogtreecommitdiff
path: root/lib/UnrarXLib/extract.cpp
diff options
context:
space:
mode:
authorJim Carroll <thecarrolls@jiminger.com>2011-06-19 22:30:53 -0400
committerJim Carroll <thecarrolls@jiminger.com>2011-06-23 10:15:27 -0400
commitf4c0efae8d41575ef4e9e7b2d50697cfe99038b5 (patch)
tree41a4281dabecb1e578b783fa4a9d7f296402ba08 /lib/UnrarXLib/extract.cpp
parentef2c3c35bec5452ed04540c6a5da9288fc2fa30b (diff)
Removed all WaitForSingleObject and WaitForMultipleObjects calls and replaced them with the latest CEvent calls.
Diffstat (limited to 'lib/UnrarXLib/extract.cpp')
-rw-r--r--lib/UnrarXLib/extract.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/UnrarXLib/extract.cpp b/lib/UnrarXLib/extract.cpp
index 17e5052d6a..74a795b3cd 100644
--- a/lib/UnrarXLib/extract.cpp
+++ b/lib/UnrarXLib/extract.cpp
@@ -751,7 +751,7 @@ bool CmdExtract::ExtractCurrentFile(CommandData *Cmd,Archive &Arc,int HeaderSize
}
if (DataIO.UnpackToMemorySize > -1)
- if (WaitForSingleObject(DataIO.hQuit,1) == WAIT_OBJECT_0)
+ if (DataIO.hQuit->WaitMSec(1))
{
return false;
}
@@ -841,14 +841,14 @@ void CmdExtract::UnstoreFile(ComprDataIO &DataIO,Int64 DestUnpSize)
{
while (1)
{
- if (WaitForSingleObject(DataIO.hQuit,1) == WAIT_OBJECT_0)
+ if (DataIO.hQuit->WaitMSec(1))
{
return;
}
int Code=DataIO.UnpRead(&Buffer[0],Buffer.Size());
if (DataIO.UnpackToMemorySize > -1 && !DataIO.NextVolumeMissing)
{
- if (WaitForSingleObject(DataIO.hSeek,1) == WAIT_OBJECT_0)
+ if (DataIO.hSeek->WaitMSec(1))
continue;
}
if (Code > 0)
@@ -861,14 +861,14 @@ void CmdExtract::UnstoreFile(ComprDataIO &DataIO,Int64 DestUnpSize)
else
{
if (DataIO.NextVolumeMissing)
- SetEvent(DataIO.hSeekDone);
+ DataIO.hSeekDone->Set();
else
- if (WaitForSingleObject(DataIO.hSeek,1) == WAIT_OBJECT_0)
+ if (DataIO.hSeek->WaitMSec(1))
continue;
- ResetEvent(DataIO.hBufferFilled);
- SetEvent(DataIO.hBufferEmpty);
- while (WaitForSingleObject(DataIO.hBufferFilled,1) != WAIT_OBJECT_0)
- if (WaitForSingleObject(DataIO.hQuit,1) == WAIT_OBJECT_0)
+ DataIO.hBufferFilled->Reset();
+ DataIO.hBufferEmpty->Set();
+ while (DataIO.hBufferFilled->WaitMSec(1))
+ if (DataIO.hQuit->WaitMSec(1))
return;
}
}