diff options
Diffstat (limited to 'src/lib/lib7z/MtCoder.h')
-rw-r--r-- | src/lib/lib7z/MtCoder.h | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/lib/lib7z/MtCoder.h b/src/lib/lib7z/MtCoder.h index e2cbdc3ab2e..89764de78f6 100644 --- a/src/lib/lib7z/MtCoder.h +++ b/src/lib/lib7z/MtCoder.h @@ -10,14 +10,14 @@ EXTERN_C_BEGIN typedef struct { - CThread thread; - CAutoResetEvent startEvent; - CAutoResetEvent finishedEvent; - int stop; - - THREAD_FUNC_TYPE func; - LPVOID param; - THREAD_FUNC_RET_TYPE res; + CThread thread; + CAutoResetEvent startEvent; + CAutoResetEvent finishedEvent; + int stop; + + THREAD_FUNC_TYPE func; + LPVOID param; + THREAD_FUNC_RET_TYPE res; } CLoopThread; void LoopThread_Construct(CLoopThread *p); @@ -35,13 +35,13 @@ WRes LoopThread_WaitSubThread(CLoopThread *p); typedef struct { - UInt64 totalInSize; - UInt64 totalOutSize; - ICompressProgress *progress; - SRes res; - CCriticalSection cs; - UInt64 inSizes[NUM_MT_CODER_THREADS_MAX]; - UInt64 outSizes[NUM_MT_CODER_THREADS_MAX]; + UInt64 totalInSize; + UInt64 totalOutSize; + ICompressProgress *progress; + SRes res; + CCriticalSection cs; + UInt64 inSizes[NUM_MT_CODER_THREADS_MAX]; + UInt64 outSizes[NUM_MT_CODER_THREADS_MAX]; } CMtProgress; SRes MtProgress_Set(CMtProgress *p, unsigned index, UInt64 inSize, UInt64 outSize); @@ -50,43 +50,43 @@ struct _CMtCoder; typedef struct { - struct _CMtCoder *mtCoder; - Byte *outBuf; - size_t outBufSize; - Byte *inBuf; - size_t inBufSize; - unsigned index; - CLoopThread thread; - - Bool stopReading; - Bool stopWriting; - CAutoResetEvent canRead; - CAutoResetEvent canWrite; + struct _CMtCoder *mtCoder; + Byte *outBuf; + size_t outBufSize; + Byte *inBuf; + size_t inBufSize; + unsigned index; + CLoopThread thread; + + Bool stopReading; + Bool stopWriting; + CAutoResetEvent canRead; + CAutoResetEvent canWrite; } CMtThread; typedef struct { - SRes (*Code)(void *p, unsigned index, Byte *dest, size_t *destSize, - const Byte *src, size_t srcSize, int finished); + SRes (*Code)(void *p, unsigned index, Byte *dest, size_t *destSize, + const Byte *src, size_t srcSize, int finished); } IMtCoderCallback; typedef struct _CMtCoder { - size_t blockSize; - size_t destBlockSize; - unsigned numThreads; + size_t blockSize; + size_t destBlockSize; + unsigned numThreads; - ISeqInStream *inStream; - ISeqOutStream *outStream; - ICompressProgress *progress; - ISzAlloc *alloc; + ISeqInStream *inStream; + ISeqOutStream *outStream; + ICompressProgress *progress; + ISzAlloc *alloc; - IMtCoderCallback *mtCallback; - CCriticalSection cs; - SRes res; + IMtCoderCallback *mtCallback; + CCriticalSection cs; + SRes res; - CMtProgress mtProgress; - CMtThread threads[NUM_MT_CODER_THREADS_MAX]; + CMtProgress mtProgress; + CMtThread threads[NUM_MT_CODER_THREADS_MAX]; } CMtCoder; void MtCoder_Construct(CMtCoder* p); |