Update to 7-Zip Version 21.03

This commit is contained in:
Tino Reichardt
2021-08-25 22:33:02 +02:00
parent 27d965fd99
commit df06f31a42
90 changed files with 6003 additions and 1882 deletions

View File

@@ -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);