Lines Matching refs:coder
80 struct lzma_stream_coder *coder; member
404 thr->block_decoder.coder, thr->allocator, in worker_decoder()
427 mythread_sync(thr->coder->mutex) { in worker_decoder()
430 mythread_cond_signal(&thr->coder->cond); in worker_decoder()
470 mythread_sync(thr->coder->mutex) { in worker_decoder()
472 thr->coder->progress_in += thr->in_pos; in worker_decoder()
473 thr->coder->progress_out += thr->out_pos; in worker_decoder()
486 && thr->coder->thread_error == LZMA_OK) in worker_decoder()
487 thr->coder->thread_error = ret; in worker_decoder()
493 thr->coder->mem_in_use -= thr->in_size; in worker_decoder()
494 thr->coder->mem_in_use -= thr->mem_filters; in worker_decoder()
495 thr->coder->mem_cached += thr->mem_filters; in worker_decoder()
498 thr->next = thr->coder->threads_free; in worker_decoder()
499 thr->coder->threads_free = thr; in worker_decoder()
502 mythread_cond_signal(&thr->coder->cond); in worker_decoder()
511 threads_end(struct lzma_stream_coder *coder, const lzma_allocator *allocator) in threads_end() argument
513 for (uint32_t i = 0; i < coder->threads_initialized; ++i) { in threads_end()
514 mythread_sync(coder->threads[i].mutex) { in threads_end()
515 coder->threads[i].state = THR_EXIT; in threads_end()
516 mythread_cond_signal(&coder->threads[i].cond); in threads_end()
520 for (uint32_t i = 0; i < coder->threads_initialized; ++i) in threads_end()
521 mythread_join(coder->threads[i].thread_id); in threads_end()
523 lzma_free(coder->threads, allocator); in threads_end()
524 coder->threads_initialized = 0; in threads_end()
525 coder->threads = NULL; in threads_end()
526 coder->threads_free = NULL; in threads_end()
529 coder->mem_in_use = 0; in threads_end()
530 coder->mem_cached = 0; in threads_end()
544 threads_stop(struct lzma_stream_coder *coder) in threads_stop() argument
546 for (uint32_t i = 0; i < coder->threads_initialized; ++i) { in threads_stop()
550 mythread_sync(coder->threads[i].mutex) { in threads_stop()
551 coder->threads[i].state = THR_IDLE; in threads_stop()
561 initialize_new_thread(struct lzma_stream_coder *coder, in initialize_new_thread() argument
568 if (coder->threads == NULL) { in initialize_new_thread()
569 coder->threads = lzma_alloc( in initialize_new_thread()
570 coder->threads_max * sizeof(struct worker_thread), in initialize_new_thread()
573 if (coder->threads == NULL) in initialize_new_thread()
578 assert(coder->threads_initialized < coder->threads_max); in initialize_new_thread()
580 = &coder->threads[coder->threads_initialized]; in initialize_new_thread()
592 thr->coder = coder; in initialize_new_thread()
600 ++coder->threads_initialized; in initialize_new_thread()
601 coder->thr = thr; in initialize_new_thread()
617 get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator) in get_thread() argument
620 mythread_sync(coder->mutex) { in get_thread()
621 if (coder->threads_free != NULL) { in get_thread()
622 coder->thr = coder->threads_free; in get_thread()
623 coder->threads_free = coder->threads_free->next; in get_thread()
630 coder->mem_cached -= coder->thr->mem_filters; in get_thread()
634 if (coder->thr == NULL) { in get_thread()
635 assert(coder->threads_initialized < coder->threads_max); in get_thread()
638 return_if_error(initialize_new_thread(coder, allocator)); in get_thread()
641 coder->thr->in_filled = 0; in get_thread()
642 coder->thr->in_pos = 0; in get_thread()
643 coder->thr->out_pos = 0; in get_thread()
645 coder->thr->progress_in = 0; in get_thread()
646 coder->thr->progress_out = 0; in get_thread()
648 coder->thr->partial_update = PARTIAL_DISABLED; in get_thread()
655 read_output_and_wait(struct lzma_stream_coder *coder, in read_output_and_wait() argument
665 mythread_sync(coder->mutex) { in read_output_and_wait()
671 ret = lzma_outq_read(&coder->outq, allocator, in read_output_and_wait()
681 &coder->outq, in read_output_and_wait()
703 coder->out_was_filled = true; in read_output_and_wait()
706 if (coder->thread_error != LZMA_OK) { in read_output_and_wait()
709 if (coder->fail_fast) { in read_output_and_wait()
710 ret = coder->thread_error; in read_output_and_wait()
729 coder->pending_error = LZMA_PROG_ERROR; in read_output_and_wait()
746 && coder->memlimit_threading in read_output_and_wait()
747 - coder->mem_in_use in read_output_and_wait()
748 - coder->outq.mem_in_use in read_output_and_wait()
749 >= coder->mem_next_block in read_output_and_wait()
750 && lzma_outq_has_buf(&coder->outq) in read_output_and_wait()
751 && (coder->threads_initialized in read_output_and_wait()
752 < coder->threads_max in read_output_and_wait()
753 || coder->threads_free in read_output_and_wait()
767 if (lzma_outq_is_empty(&coder->outq)) { in read_output_and_wait()
787 if (lzma_outq_is_readable(&coder->outq)) { in read_output_and_wait()
823 if (coder->thr != NULL && coder->thr->partial_update in read_output_and_wait()
826 assert(coder->thr->outbuf == coder->outq.head); in read_output_and_wait()
827 assert(coder->thr->outbuf == coder->outq.tail); in read_output_and_wait()
829 if (coder->thr->outbuf->decoder_in_pos in read_output_and_wait()
830 == coder->thr->in_filled) in read_output_and_wait()
835 if (coder->timeout != 0) { in read_output_and_wait()
846 &coder->cond, in read_output_and_wait()
847 coder->timeout); in read_output_and_wait()
850 if (mythread_cond_timedwait(&coder->cond, in read_output_and_wait()
851 &coder->mutex, in read_output_and_wait()
857 mythread_cond_wait(&coder->cond, in read_output_and_wait()
858 &coder->mutex); in read_output_and_wait()
867 threads_stop(coder); in read_output_and_wait()
874 decode_block_header(struct lzma_stream_coder *coder, in decode_block_header() argument
881 if (coder->pos == 0) { in decode_block_header()
889 coder->block_options.header_size in decode_block_header()
895 lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos, in decode_block_header()
896 coder->block_options.header_size); in decode_block_header()
899 if (coder->pos < coder->block_options.header_size) in decode_block_header()
902 coder->pos = 0; in decode_block_header()
905 coder->block_options.version = 1; in decode_block_header()
909 coder->block_options.filters = coder->filters; in decode_block_header()
912 return_if_error(lzma_block_header_decode(&coder->block_options, in decode_block_header()
913 allocator, coder->buffer)); in decode_block_header()
918 coder->block_options.ignore_check = coder->ignore_check; in decode_block_header()
927 comp_blk_size(const struct lzma_stream_coder *coder) in comp_blk_size() argument
929 return vli_ceil4(coder->block_options.compressed_size) in comp_blk_size()
930 + lzma_check_size(coder->stream_flags.check); in comp_blk_size()
946 stream_decoder_reset(struct lzma_stream_coder *coder, in stream_decoder_reset() argument
950 coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator); in stream_decoder_reset()
951 if (coder->index_hash == NULL) in stream_decoder_reset()
955 coder->sequence = SEQ_STREAM_HEADER; in stream_decoder_reset()
956 coder->pos = 0; in stream_decoder_reset()
969 struct lzma_stream_coder *coder = coder_ptr; in stream_decode_mt() local
1023 || (*in_pos == in_size && !coder->out_was_filled); in stream_decode_mt()
1024 coder->out_was_filled = false; in stream_decode_mt()
1027 switch (coder->sequence) { in stream_decode_mt()
1031 lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos, in stream_decode_mt()
1033 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1036 if (coder->pos < LZMA_STREAM_HEADER_SIZE) in stream_decode_mt()
1039 coder->pos = 0; in stream_decode_mt()
1043 &coder->stream_flags, coder->buffer); in stream_decode_mt()
1045 return ret == LZMA_FORMAT_ERROR && !coder->first_stream in stream_decode_mt()
1051 coder->first_stream = false; in stream_decode_mt()
1055 coder->block_options.check = coder->stream_flags.check; in stream_decode_mt()
1059 coder->sequence = SEQ_BLOCK_HEADER; in stream_decode_mt()
1063 if (coder->tell_no_check && coder->stream_flags.check in stream_decode_mt()
1067 if (coder->tell_unsupported_check in stream_decode_mt()
1069 coder->stream_flags.check)) in stream_decode_mt()
1072 if (coder->tell_any_check) in stream_decode_mt()
1080 const lzma_ret ret = decode_block_header(coder, allocator, in stream_decode_mt()
1082 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1153 if (action == LZMA_FINISH && coder->fail_fast) { in stream_decode_mt()
1157 threads_stop(coder); in stream_decode_mt()
1163 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1168 if (coder->pending_error != LZMA_OK) { in stream_decode_mt()
1169 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1177 coder->sequence = SEQ_INDEX_WAIT_OUTPUT; in stream_decode_mt()
1194 coder->pending_error = ret; in stream_decode_mt()
1195 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1200 coder->mem_next_filters = lzma_raw_decoder_memusage( in stream_decode_mt()
1201 coder->filters); in stream_decode_mt()
1203 if (coder->mem_next_filters == UINT64_MAX) { in stream_decode_mt()
1205 coder->pending_error = LZMA_OPTIONS_ERROR; in stream_decode_mt()
1206 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1210 coder->sequence = SEQ_BLOCK_INIT; in stream_decode_mt()
1221 if (coder->mem_next_filters > coder->memlimit_stop) { in stream_decode_mt()
1226 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1230 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1241 if (is_direct_mode_needed(coder->block_options.compressed_size) in stream_decode_mt()
1243 coder->block_options.uncompressed_size)) { in stream_decode_mt()
1244 coder->sequence = SEQ_BLOCK_DIRECT_INIT; in stream_decode_mt()
1253 coder->mem_next_in = comp_blk_size(coder); in stream_decode_mt()
1254 const uint64_t mem_buffers = coder->mem_next_in in stream_decode_mt()
1256 coder->block_options.uncompressed_size); in stream_decode_mt()
1260 if (UINT64_MAX - mem_buffers < coder->mem_next_filters) { in stream_decode_mt()
1265 coder->sequence = SEQ_BLOCK_DIRECT_INIT; in stream_decode_mt()
1271 coder->mem_next_block = coder->mem_next_filters + mem_buffers; in stream_decode_mt()
1275 if (coder->mem_next_block > coder->memlimit_threading) { in stream_decode_mt()
1276 coder->sequence = SEQ_BLOCK_DIRECT_INIT; in stream_decode_mt()
1282 lzma_next_end(&coder->block_decoder, allocator); in stream_decode_mt()
1283 coder->mem_direct_mode = 0; in stream_decode_mt()
1288 const lzma_ret ret = lzma_index_hash_append(coder->index_hash, in stream_decode_mt()
1290 &coder->block_options), in stream_decode_mt()
1291 coder->block_options.uncompressed_size); in stream_decode_mt()
1293 coder->pending_error = ret; in stream_decode_mt()
1294 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1298 coder->sequence = SEQ_BLOCK_THR_INIT; in stream_decode_mt()
1321 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1326 if (coder->pending_error != LZMA_OK) { in stream_decode_mt()
1327 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1338 assert(!lzma_outq_is_empty(&coder->outq)); in stream_decode_mt()
1358 mythread_sync(coder->mutex) { in stream_decode_mt()
1359 mem_in_use = coder->mem_in_use; in stream_decode_mt()
1360 mem_cached = coder->mem_cached; in stream_decode_mt()
1361 thr = coder->threads_free; in stream_decode_mt()
1367 const uint64_t mem_max = coder->memlimit_threading in stream_decode_mt()
1368 - coder->mem_next_block; in stream_decode_mt()
1377 if (mem_in_use + mem_cached + coder->outq.mem_allocated in stream_decode_mt()
1383 lzma_outq_clear_cache2(&coder->outq, allocator, in stream_decode_mt()
1384 coder->block_options.uncompressed_size); in stream_decode_mt()
1400 + coder->outq.mem_in_use > mem_max) { in stream_decode_mt()
1407 if (thr->mem_filters <= coder->mem_next_filters) in stream_decode_mt()
1421 mythread_sync(coder->mutex) { in stream_decode_mt()
1422 coder->mem_cached -= mem_freed; in stream_decode_mt()
1433 coder->mem_in_use += coder->mem_next_in in stream_decode_mt()
1434 + coder->mem_next_filters; in stream_decode_mt()
1439 &coder->outq, allocator, in stream_decode_mt()
1440 coder->block_options.uncompressed_size); in stream_decode_mt()
1442 threads_stop(coder); in stream_decode_mt()
1447 ret = get_thread(coder, allocator); in stream_decode_mt()
1449 threads_stop(coder); in stream_decode_mt()
1455 coder->thr->mem_filters = coder->mem_next_filters; in stream_decode_mt()
1458 coder->thr->block_options = coder->block_options; in stream_decode_mt()
1460 &coder->thr->block_decoder, allocator, in stream_decode_mt()
1461 &coder->thr->block_options); in stream_decode_mt()
1465 lzma_filters_free(coder->filters, allocator); in stream_decode_mt()
1466 coder->thr->block_options.filters = NULL; in stream_decode_mt()
1471 coder->pending_error = ret; in stream_decode_mt()
1472 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1477 coder->thr->in_size = coder->mem_next_in; in stream_decode_mt()
1478 coder->thr->in = lzma_alloc(coder->thr->in_size, allocator); in stream_decode_mt()
1479 if (coder->thr->in == NULL) { in stream_decode_mt()
1480 threads_stop(coder); in stream_decode_mt()
1485 coder->thr->outbuf = lzma_outq_get_buf( in stream_decode_mt()
1486 &coder->outq, coder->thr); in stream_decode_mt()
1489 mythread_sync(coder->thr->mutex) { in stream_decode_mt()
1490 assert(coder->thr->state == THR_IDLE); in stream_decode_mt()
1491 coder->thr->state = THR_RUN; in stream_decode_mt()
1492 mythread_cond_signal(&coder->thr->cond); in stream_decode_mt()
1497 mythread_sync(coder->mutex) { in stream_decode_mt()
1498 lzma_outq_enable_partial_output(&coder->outq, in stream_decode_mt()
1502 coder->sequence = SEQ_BLOCK_THR_RUN; in stream_decode_mt()
1507 if (action == LZMA_FINISH && coder->fail_fast) { in stream_decode_mt()
1514 const size_t in_needed = coder->thr->in_size in stream_decode_mt()
1515 - coder->thr->in_filled; in stream_decode_mt()
1517 threads_stop(coder); in stream_decode_mt()
1523 size_t cur_in_filled = coder->thr->in_filled; in stream_decode_mt()
1524 lzma_bufcpy(in, in_pos, in_size, coder->thr->in, in stream_decode_mt()
1525 &cur_in_filled, coder->thr->in_size); in stream_decode_mt()
1528 mythread_sync(coder->thr->mutex) { in stream_decode_mt()
1529 coder->thr->in_filled = cur_in_filled; in stream_decode_mt()
1537 mythread_cond_signal(&coder->thr->cond); in stream_decode_mt()
1550 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1556 if (coder->pending_error != LZMA_OK) { in stream_decode_mt()
1557 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1566 if (coder->thr->in_filled < coder->thr->in_size) { in stream_decode_mt()
1573 coder->thr = NULL; in stream_decode_mt()
1574 coder->sequence = SEQ_BLOCK_HEADER; in stream_decode_mt()
1587 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1590 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1594 lzma_outq_clear_cache(&coder->outq, allocator); in stream_decode_mt()
1598 threads_end(coder, allocator); in stream_decode_mt()
1602 &coder->block_decoder, allocator, in stream_decode_mt()
1603 &coder->block_options); in stream_decode_mt()
1607 lzma_filters_free(coder->filters, allocator); in stream_decode_mt()
1608 coder->block_options.filters = NULL; in stream_decode_mt()
1615 coder->mem_direct_mode = coder->mem_next_filters; in stream_decode_mt()
1617 coder->sequence = SEQ_BLOCK_DIRECT_RUN; in stream_decode_mt()
1624 const lzma_ret ret = coder->block_decoder.code( in stream_decode_mt()
1625 coder->block_decoder.coder, allocator, in stream_decode_mt()
1628 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1629 coder->progress_out += *out_pos - out_old; in stream_decode_mt()
1636 return_if_error(lzma_index_hash_append(coder->index_hash, in stream_decode_mt()
1638 &coder->block_options), in stream_decode_mt()
1639 coder->block_options.uncompressed_size)); in stream_decode_mt()
1641 coder->sequence = SEQ_BLOCK_HEADER; in stream_decode_mt()
1648 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1652 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1655 coder->sequence = SEQ_INDEX_DECODE; in stream_decode_mt()
1668 const lzma_ret ret = lzma_index_hash_decode(coder->index_hash, in stream_decode_mt()
1670 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1674 coder->sequence = SEQ_STREAM_FOOTER; in stream_decode_mt()
1681 lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos, in stream_decode_mt()
1683 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1686 if (coder->pos < LZMA_STREAM_HEADER_SIZE) in stream_decode_mt()
1689 coder->pos = 0; in stream_decode_mt()
1696 &footer_flags, coder->buffer); in stream_decode_mt()
1703 if (lzma_index_hash_size(coder->index_hash) in stream_decode_mt()
1710 &coder->stream_flags, &footer_flags)); in stream_decode_mt()
1712 if (!coder->concatenated) in stream_decode_mt()
1715 coder->sequence = SEQ_STREAM_PADDING; in stream_decode_mt()
1720 assert(coder->concatenated); in stream_decode_mt()
1732 return coder->pos == 0 in stream_decode_mt()
1743 ++coder->progress_in; in stream_decode_mt()
1744 coder->pos = (coder->pos + 1) & 3; in stream_decode_mt()
1749 if (coder->pos != 0) { in stream_decode_mt()
1751 ++coder->progress_in; in stream_decode_mt()
1756 return_if_error(stream_decoder_reset(coder, allocator)); in stream_decode_mt()
1760 if (!coder->fail_fast) { in stream_decode_mt()
1769 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1775 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1782 return coder->pending_error; in stream_decode_mt()
1796 struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_end() local
1798 threads_end(coder, allocator); in stream_decoder_mt_end()
1799 lzma_outq_end(&coder->outq, allocator); in stream_decoder_mt_end()
1801 lzma_next_end(&coder->block_decoder, allocator); in stream_decoder_mt_end()
1802 lzma_filters_free(coder->filters, allocator); in stream_decoder_mt_end()
1803 lzma_index_hash_end(coder->index_hash, allocator); in stream_decoder_mt_end()
1805 lzma_free(coder, allocator); in stream_decoder_mt_end()
1813 const struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_get_check() local
1814 return coder->stream_flags.check; in stream_decoder_mt_get_check()
1838 struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_memconfig() local
1840 mythread_sync(coder->mutex) { in stream_decoder_mt_memconfig()
1841 *memusage = coder->mem_direct_mode in stream_decoder_mt_memconfig()
1842 + coder->mem_in_use in stream_decoder_mt_memconfig()
1843 + coder->mem_cached in stream_decoder_mt_memconfig()
1844 + coder->outq.mem_allocated; in stream_decoder_mt_memconfig()
1852 *old_memlimit = coder->memlimit_stop; in stream_decoder_mt_memconfig()
1858 coder->memlimit_stop = new_memlimit; in stream_decoder_mt_memconfig()
1869 struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_get_progress() local
1873 mythread_sync(coder->mutex) { in stream_decoder_mt_get_progress()
1874 *progress_in = coder->progress_in; in stream_decoder_mt_get_progress()
1875 *progress_out = coder->progress_out; in stream_decoder_mt_get_progress()
1877 for (size_t i = 0; i < coder->threads_initialized; ++i) { in stream_decoder_mt_get_progress()
1878 mythread_sync(coder->threads[i].mutex) { in stream_decoder_mt_get_progress()
1879 *progress_in += coder->threads[i].progress_in; in stream_decoder_mt_get_progress()
1880 *progress_out += coder->threads[i] in stream_decoder_mt_get_progress()
1894 struct lzma_stream_coder *coder; in stream_decoder_mt_init() local
1904 coder = next->coder; in stream_decoder_mt_init()
1905 if (!coder) { in stream_decoder_mt_init()
1906 coder = lzma_alloc(sizeof(struct lzma_stream_coder), allocator); in stream_decoder_mt_init()
1907 if (coder == NULL) in stream_decoder_mt_init()
1910 next->coder = coder; in stream_decoder_mt_init()
1912 if (mythread_mutex_init(&coder->mutex)) { in stream_decoder_mt_init()
1913 lzma_free(coder, allocator); in stream_decoder_mt_init()
1917 if (mythread_cond_init(&coder->cond)) { in stream_decoder_mt_init()
1918 mythread_mutex_destroy(&coder->mutex); in stream_decoder_mt_init()
1919 lzma_free(coder, allocator); in stream_decoder_mt_init()
1929 coder->filters[0].id = LZMA_VLI_UNKNOWN; in stream_decoder_mt_init()
1930 memzero(&coder->outq, sizeof(coder->outq)); in stream_decoder_mt_init()
1932 coder->block_decoder = LZMA_NEXT_CODER_INIT; in stream_decoder_mt_init()
1933 coder->mem_direct_mode = 0; in stream_decoder_mt_init()
1935 coder->index_hash = NULL; in stream_decoder_mt_init()
1936 coder->threads = NULL; in stream_decoder_mt_init()
1937 coder->threads_free = NULL; in stream_decoder_mt_init()
1938 coder->threads_initialized = 0; in stream_decoder_mt_init()
1943 lzma_filters_free(coder->filters, allocator); in stream_decoder_mt_init()
1958 threads_end(coder, allocator); in stream_decoder_mt_init()
1966 coder->mem_in_use = 0; in stream_decoder_mt_init()
1967 coder->mem_cached = 0; in stream_decoder_mt_init()
1968 coder->mem_next_block = 0; in stream_decoder_mt_init()
1970 coder->progress_in = 0; in stream_decoder_mt_init()
1971 coder->progress_out = 0; in stream_decoder_mt_init()
1973 coder->sequence = SEQ_STREAM_HEADER; in stream_decoder_mt_init()
1974 coder->thread_error = LZMA_OK; in stream_decoder_mt_init()
1975 coder->pending_error = LZMA_OK; in stream_decoder_mt_init()
1976 coder->thr = NULL; in stream_decoder_mt_init()
1978 coder->timeout = options->timeout; in stream_decoder_mt_init()
1980 coder->memlimit_threading = my_max(1, options->memlimit_threading); in stream_decoder_mt_init()
1981 coder->memlimit_stop = my_max(1, options->memlimit_stop); in stream_decoder_mt_init()
1982 if (coder->memlimit_threading > coder->memlimit_stop) in stream_decoder_mt_init()
1983 coder->memlimit_threading = coder->memlimit_stop; in stream_decoder_mt_init()
1985 coder->tell_no_check = (options->flags & LZMA_TELL_NO_CHECK) != 0; in stream_decoder_mt_init()
1986 coder->tell_unsupported_check in stream_decoder_mt_init()
1988 coder->tell_any_check = (options->flags & LZMA_TELL_ANY_CHECK) != 0; in stream_decoder_mt_init()
1989 coder->ignore_check = (options->flags & LZMA_IGNORE_CHECK) != 0; in stream_decoder_mt_init()
1990 coder->concatenated = (options->flags & LZMA_CONCATENATED) != 0; in stream_decoder_mt_init()
1991 coder->fail_fast = (options->flags & LZMA_FAIL_FAST) != 0; in stream_decoder_mt_init()
1993 coder->first_stream = true; in stream_decoder_mt_init()
1994 coder->out_was_filled = false; in stream_decoder_mt_init()
1995 coder->pos = 0; in stream_decoder_mt_init()
1997 coder->threads_max = options->threads; in stream_decoder_mt_init()
1999 return_if_error(lzma_outq_init(&coder->outq, allocator, in stream_decoder_mt_init()
2000 coder->threads_max)); in stream_decoder_mt_init()
2002 return stream_decoder_reset(coder, allocator); in stream_decoder_mt_init()