mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-12 05:09:59 -06:00
Update to 7-Zip Version 21.03
This commit is contained in:
@@ -67,7 +67,6 @@ HRes CMemBlockManagerMt::AllocateSpace(size_t numBlocks, size_t numNoLockBlocks)
|
||||
return E_OUTOFMEMORY;
|
||||
if (!CMemBlockManager::AllocateSpace_bool(numBlocks))
|
||||
return E_OUTOFMEMORY;
|
||||
Semaphore.Close();
|
||||
// we need (maxCount = 1), if we want to create non-use empty Semaphore
|
||||
if (maxCount == 0)
|
||||
maxCount = 1;
|
||||
@@ -75,12 +74,13 @@ HRes CMemBlockManagerMt::AllocateSpace(size_t numBlocks, size_t numNoLockBlocks)
|
||||
// printf("\n Synchro.Create() \n");
|
||||
WRes wres;
|
||||
#ifndef _WIN32
|
||||
Semaphore.Close();
|
||||
wres = Synchro.Create();
|
||||
if (wres != 0)
|
||||
return HRESULT_FROM_WIN32(wres);
|
||||
wres = Semaphore.Create(&Synchro, (UInt32)numLockBlocks, maxCount);
|
||||
#else
|
||||
wres = Semaphore.Create((UInt32)numLockBlocks, maxCount);
|
||||
wres = Semaphore.OptCreateInit((UInt32)numLockBlocks, maxCount);
|
||||
#endif
|
||||
|
||||
return HRESULT_FROM_WIN32(wres);
|
||||
|
||||
Reference in New Issue
Block a user