Update to 7-Zip Version 21.02

This commit is contained in:
Tino Reichardt
2021-05-13 16:39:14 +02:00
parent 3724ecfedc
commit 48fa49f76c
620 changed files with 35032 additions and 10925 deletions

View File

@@ -17,8 +17,8 @@ class COutMemStream:
bool _realStreamMode;
bool _unlockEventWasSent;
NWindows::NSynchronization::CAutoResetEvent StopWritingEvent;
NWindows::NSynchronization::CAutoResetEvent WriteToRealStreamEvent;
NWindows::NSynchronization::CAutoResetEvent_WFMO StopWritingEvent;
NWindows::NSynchronization::CAutoResetEvent_WFMO WriteToRealStreamEvent;
// NWindows::NSynchronization::CAutoResetEvent NoLockEvent;
HRESULT StopWriteResult;
@@ -31,10 +31,13 @@ class COutMemStream:
public:
HRes CreateEvents()
HRes CreateEvents(SYNC_PARAM_DECL(synchro))
{
RINOK(StopWritingEvent.CreateIfNotCreated());
return WriteToRealStreamEvent.CreateIfNotCreated();
WRes wres = StopWritingEvent.CreateIfNotCreated_Reset(SYNC_WFMO(synchro));
if (wres == 0)
wres = WriteToRealStreamEvent.CreateIfNotCreated_Reset(SYNC_WFMO(synchro));
return HRESULT_FROM_WIN32(wres);
}
void SetOutStream(IOutStream *outStream)
@@ -55,7 +58,16 @@ public:
OutSeqStream.Release();
}
COutMemStream(CMemBlockManagerMt *memManager): _memManager(memManager) { }
COutMemStream(CMemBlockManagerMt *memManager):
_memManager(memManager)
{
/*
#ifndef _WIN32
StopWritingEvent._sync =
WriteToRealStreamEvent._sync = &memManager->Synchro;
#endif
*/
}
~COutMemStream() { Free(); }
void Free();