Lines Matching refs:coder
85 struct lzma_stream_coder *coder; member
355 thr->coder->mem_in_use -= thr->in_size; in worker_stop()
358 thr->coder->mem_in_use -= thr->mem_filters; in worker_stop()
359 thr->coder->mem_cached += thr->mem_filters; in worker_stop()
362 thr->next = thr->coder->threads_free; in worker_stop()
363 thr->coder->threads_free = thr; in worker_stop()
365 mythread_cond_signal(&thr->coder->cond); in worker_stop()
404 mythread_sync(thr->coder->mutex) { in worker_decoder()
441 thr->block_decoder.coder, thr->allocator, in worker_decoder()
464 mythread_sync(thr->coder->mutex) { in worker_decoder()
467 mythread_cond_signal(&thr->coder->cond); in worker_decoder()
494 mythread_sync(thr->coder->mutex) { in worker_decoder()
496 thr->coder->progress_in += thr->in_pos; in worker_decoder()
497 thr->coder->progress_out += thr->out_pos; in worker_decoder()
510 && thr->coder->thread_error == LZMA_OK) in worker_decoder()
511 thr->coder->thread_error = ret; in worker_decoder()
522 threads_end(struct lzma_stream_coder *coder, const lzma_allocator *allocator) in threads_end() argument
524 for (uint32_t i = 0; i < coder->threads_initialized; ++i) { in threads_end()
525 mythread_sync(coder->threads[i].mutex) { in threads_end()
526 coder->threads[i].state = THR_EXIT; in threads_end()
527 mythread_cond_signal(&coder->threads[i].cond); in threads_end()
531 for (uint32_t i = 0; i < coder->threads_initialized; ++i) in threads_end()
532 mythread_join(coder->threads[i].thread_id); in threads_end()
534 lzma_free(coder->threads, allocator); in threads_end()
535 coder->threads_initialized = 0; in threads_end()
536 coder->threads = NULL; in threads_end()
537 coder->threads_free = NULL; in threads_end()
540 coder->mem_in_use = 0; in threads_end()
541 coder->mem_cached = 0; in threads_end()
548 threads_stop(struct lzma_stream_coder *coder) in threads_stop() argument
550 for (uint32_t i = 0; i < coder->threads_initialized; ++i) { in threads_stop()
551 mythread_sync(coder->threads[i].mutex) { in threads_stop()
554 if (coder->threads[i].state != THR_IDLE) { in threads_stop()
555 coder->threads[i].state = THR_STOP; in threads_stop()
556 mythread_cond_signal(&coder->threads[i].cond); in threads_stop()
567 initialize_new_thread(struct lzma_stream_coder *coder, in initialize_new_thread() argument
574 if (coder->threads == NULL) { in initialize_new_thread()
575 coder->threads = lzma_alloc( in initialize_new_thread()
576 coder->threads_max * sizeof(struct worker_thread), in initialize_new_thread()
579 if (coder->threads == NULL) in initialize_new_thread()
584 assert(coder->threads_initialized < coder->threads_max); in initialize_new_thread()
586 = &coder->threads[coder->threads_initialized]; in initialize_new_thread()
598 thr->coder = coder; in initialize_new_thread()
606 ++coder->threads_initialized; in initialize_new_thread()
607 coder->thr = thr; in initialize_new_thread()
623 get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator) in get_thread() argument
626 mythread_sync(coder->mutex) { in get_thread()
627 if (coder->threads_free != NULL) { in get_thread()
628 coder->thr = coder->threads_free; in get_thread()
629 coder->threads_free = coder->threads_free->next; in get_thread()
636 coder->mem_cached -= coder->thr->mem_filters; in get_thread()
640 if (coder->thr == NULL) { in get_thread()
641 assert(coder->threads_initialized < coder->threads_max); in get_thread()
644 return_if_error(initialize_new_thread(coder, allocator)); in get_thread()
647 coder->thr->in_filled = 0; in get_thread()
648 coder->thr->in_pos = 0; in get_thread()
649 coder->thr->out_pos = 0; in get_thread()
651 coder->thr->progress_in = 0; in get_thread()
652 coder->thr->progress_out = 0; in get_thread()
654 coder->thr->partial_update = PARTIAL_DISABLED; in get_thread()
661 read_output_and_wait(struct lzma_stream_coder *coder, in read_output_and_wait() argument
671 mythread_sync(coder->mutex) { in read_output_and_wait()
677 ret = lzma_outq_read(&coder->outq, allocator, in read_output_and_wait()
687 &coder->outq, in read_output_and_wait()
709 coder->out_was_filled = true; in read_output_and_wait()
712 if (coder->thread_error != LZMA_OK) { in read_output_and_wait()
715 if (coder->fail_fast) { in read_output_and_wait()
716 ret = coder->thread_error; in read_output_and_wait()
735 coder->pending_error = LZMA_PROG_ERROR; in read_output_and_wait()
752 && coder->memlimit_threading in read_output_and_wait()
753 - coder->mem_in_use in read_output_and_wait()
754 - coder->outq.mem_in_use in read_output_and_wait()
755 >= coder->mem_next_block in read_output_and_wait()
756 && lzma_outq_has_buf(&coder->outq) in read_output_and_wait()
757 && (coder->threads_initialized in read_output_and_wait()
758 < coder->threads_max in read_output_and_wait()
759 || coder->threads_free in read_output_and_wait()
773 if (lzma_outq_is_empty(&coder->outq)) { in read_output_and_wait()
793 if (lzma_outq_is_readable(&coder->outq)) { in read_output_and_wait()
829 if (coder->thr != NULL && coder->thr->partial_update in read_output_and_wait()
832 assert(coder->thr->outbuf == coder->outq.head); in read_output_and_wait()
833 assert(coder->thr->outbuf == coder->outq.tail); in read_output_and_wait()
835 if (coder->thr->outbuf->decoder_in_pos in read_output_and_wait()
836 == coder->thr->in_filled) in read_output_and_wait()
841 if (coder->timeout != 0) { in read_output_and_wait()
852 &coder->cond, in read_output_and_wait()
853 coder->timeout); in read_output_and_wait()
856 if (mythread_cond_timedwait(&coder->cond, in read_output_and_wait()
857 &coder->mutex, in read_output_and_wait()
863 mythread_cond_wait(&coder->cond, in read_output_and_wait()
864 &coder->mutex); in read_output_and_wait()
873 threads_stop(coder); in read_output_and_wait()
880 decode_block_header(struct lzma_stream_coder *coder, in decode_block_header() argument
887 if (coder->pos == 0) { in decode_block_header()
895 coder->block_options.header_size in decode_block_header()
901 lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos, in decode_block_header()
902 coder->block_options.header_size); in decode_block_header()
905 if (coder->pos < coder->block_options.header_size) in decode_block_header()
908 coder->pos = 0; in decode_block_header()
911 coder->block_options.version = 1; in decode_block_header()
915 coder->block_options.filters = coder->filters; in decode_block_header()
918 return_if_error(lzma_block_header_decode(&coder->block_options, in decode_block_header()
919 allocator, coder->buffer)); in decode_block_header()
924 coder->block_options.ignore_check = coder->ignore_check; in decode_block_header()
933 comp_blk_size(const struct lzma_stream_coder *coder) in comp_blk_size() argument
935 return vli_ceil4(coder->block_options.compressed_size) in comp_blk_size()
936 + lzma_check_size(coder->stream_flags.check); in comp_blk_size()
952 stream_decoder_reset(struct lzma_stream_coder *coder, in stream_decoder_reset() argument
956 coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator); in stream_decoder_reset()
957 if (coder->index_hash == NULL) in stream_decoder_reset()
961 coder->sequence = SEQ_STREAM_HEADER; in stream_decoder_reset()
962 coder->pos = 0; in stream_decoder_reset()
975 struct lzma_stream_coder *coder = coder_ptr; in stream_decode_mt() local
1029 || (*in_pos == in_size && !coder->out_was_filled); in stream_decode_mt()
1030 coder->out_was_filled = false; in stream_decode_mt()
1033 switch (coder->sequence) { in stream_decode_mt()
1037 lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos, in stream_decode_mt()
1039 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1042 if (coder->pos < LZMA_STREAM_HEADER_SIZE) in stream_decode_mt()
1045 coder->pos = 0; in stream_decode_mt()
1049 &coder->stream_flags, coder->buffer); in stream_decode_mt()
1051 return ret == LZMA_FORMAT_ERROR && !coder->first_stream in stream_decode_mt()
1057 coder->first_stream = false; in stream_decode_mt()
1061 coder->block_options.check = coder->stream_flags.check; in stream_decode_mt()
1065 coder->sequence = SEQ_BLOCK_HEADER; in stream_decode_mt()
1069 if (coder->tell_no_check && coder->stream_flags.check in stream_decode_mt()
1073 if (coder->tell_unsupported_check in stream_decode_mt()
1075 coder->stream_flags.check)) in stream_decode_mt()
1078 if (coder->tell_any_check) in stream_decode_mt()
1086 const lzma_ret ret = decode_block_header(coder, allocator, in stream_decode_mt()
1088 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1159 if (action == LZMA_FINISH && coder->fail_fast) { in stream_decode_mt()
1163 threads_stop(coder); in stream_decode_mt()
1169 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1174 if (coder->pending_error != LZMA_OK) { in stream_decode_mt()
1175 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1183 coder->sequence = SEQ_INDEX_WAIT_OUTPUT; in stream_decode_mt()
1200 coder->pending_error = ret; in stream_decode_mt()
1201 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1206 coder->mem_next_filters = lzma_raw_decoder_memusage( in stream_decode_mt()
1207 coder->filters); in stream_decode_mt()
1209 if (coder->mem_next_filters == UINT64_MAX) { in stream_decode_mt()
1211 coder->pending_error = LZMA_OPTIONS_ERROR; in stream_decode_mt()
1212 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1216 coder->sequence = SEQ_BLOCK_INIT; in stream_decode_mt()
1228 if (coder->mem_next_filters > coder->memlimit_stop) { in stream_decode_mt()
1233 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1237 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1248 if (is_direct_mode_needed(coder->block_options.compressed_size) in stream_decode_mt()
1250 coder->block_options.uncompressed_size)) { in stream_decode_mt()
1251 coder->sequence = SEQ_BLOCK_DIRECT_INIT; in stream_decode_mt()
1260 coder->mem_next_in = comp_blk_size(coder); in stream_decode_mt()
1261 const uint64_t mem_buffers = coder->mem_next_in in stream_decode_mt()
1263 coder->block_options.uncompressed_size); in stream_decode_mt()
1267 if (UINT64_MAX - mem_buffers < coder->mem_next_filters) { in stream_decode_mt()
1272 coder->sequence = SEQ_BLOCK_DIRECT_INIT; in stream_decode_mt()
1278 coder->mem_next_block = coder->mem_next_filters + mem_buffers; in stream_decode_mt()
1282 if (coder->mem_next_block > coder->memlimit_threading) { in stream_decode_mt()
1283 coder->sequence = SEQ_BLOCK_DIRECT_INIT; in stream_decode_mt()
1289 lzma_next_end(&coder->block_decoder, allocator); in stream_decode_mt()
1290 coder->mem_direct_mode = 0; in stream_decode_mt()
1295 const lzma_ret ret = lzma_index_hash_append(coder->index_hash, in stream_decode_mt()
1297 &coder->block_options), in stream_decode_mt()
1298 coder->block_options.uncompressed_size); in stream_decode_mt()
1300 coder->pending_error = ret; in stream_decode_mt()
1301 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1305 coder->sequence = SEQ_BLOCK_THR_INIT; in stream_decode_mt()
1329 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1334 if (coder->pending_error != LZMA_OK) { in stream_decode_mt()
1335 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1346 assert(!lzma_outq_is_empty(&coder->outq)); in stream_decode_mt()
1366 mythread_sync(coder->mutex) { in stream_decode_mt()
1367 mem_in_use = coder->mem_in_use; in stream_decode_mt()
1368 mem_cached = coder->mem_cached; in stream_decode_mt()
1369 thr = coder->threads_free; in stream_decode_mt()
1375 const uint64_t mem_max = coder->memlimit_threading in stream_decode_mt()
1376 - coder->mem_next_block; in stream_decode_mt()
1385 if (mem_in_use + mem_cached + coder->outq.mem_allocated in stream_decode_mt()
1391 lzma_outq_clear_cache2(&coder->outq, allocator, in stream_decode_mt()
1392 coder->block_options.uncompressed_size); in stream_decode_mt()
1408 + coder->outq.mem_in_use > mem_max) { in stream_decode_mt()
1415 if (thr->mem_filters <= coder->mem_next_filters) in stream_decode_mt()
1429 mythread_sync(coder->mutex) { in stream_decode_mt()
1430 coder->mem_cached -= mem_freed; in stream_decode_mt()
1441 coder->mem_in_use += coder->mem_next_in in stream_decode_mt()
1442 + coder->mem_next_filters; in stream_decode_mt()
1447 &coder->outq, allocator, in stream_decode_mt()
1448 coder->block_options.uncompressed_size); in stream_decode_mt()
1450 threads_stop(coder); in stream_decode_mt()
1455 ret = get_thread(coder, allocator); in stream_decode_mt()
1457 threads_stop(coder); in stream_decode_mt()
1463 coder->thr->mem_filters = coder->mem_next_filters; in stream_decode_mt()
1466 coder->thr->block_options = coder->block_options; in stream_decode_mt()
1468 &coder->thr->block_decoder, allocator, in stream_decode_mt()
1469 &coder->thr->block_options); in stream_decode_mt()
1473 lzma_filters_free(coder->filters, allocator); in stream_decode_mt()
1474 coder->thr->block_options.filters = NULL; in stream_decode_mt()
1479 coder->pending_error = ret; in stream_decode_mt()
1480 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1485 coder->thr->in_size = coder->mem_next_in; in stream_decode_mt()
1486 coder->thr->in = lzma_alloc(coder->thr->in_size, allocator); in stream_decode_mt()
1487 if (coder->thr->in == NULL) { in stream_decode_mt()
1488 threads_stop(coder); in stream_decode_mt()
1493 coder->thr->outbuf = lzma_outq_get_buf( in stream_decode_mt()
1494 &coder->outq, coder->thr); in stream_decode_mt()
1497 mythread_sync(coder->thr->mutex) { in stream_decode_mt()
1498 assert(coder->thr->state == THR_IDLE); in stream_decode_mt()
1499 coder->thr->state = THR_RUN; in stream_decode_mt()
1500 mythread_cond_signal(&coder->thr->cond); in stream_decode_mt()
1505 mythread_sync(coder->mutex) { in stream_decode_mt()
1506 lzma_outq_enable_partial_output(&coder->outq, in stream_decode_mt()
1510 coder->sequence = SEQ_BLOCK_THR_RUN; in stream_decode_mt()
1516 if (action == LZMA_FINISH && coder->fail_fast) { in stream_decode_mt()
1523 const size_t in_needed = coder->thr->in_size in stream_decode_mt()
1524 - coder->thr->in_filled; in stream_decode_mt()
1526 threads_stop(coder); in stream_decode_mt()
1532 size_t cur_in_filled = coder->thr->in_filled; in stream_decode_mt()
1533 lzma_bufcpy(in, in_pos, in_size, coder->thr->in, in stream_decode_mt()
1534 &cur_in_filled, coder->thr->in_size); in stream_decode_mt()
1537 mythread_sync(coder->thr->mutex) { in stream_decode_mt()
1538 coder->thr->in_filled = cur_in_filled; in stream_decode_mt()
1546 mythread_cond_signal(&coder->thr->cond); in stream_decode_mt()
1553 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1558 if (coder->pending_error != LZMA_OK) { in stream_decode_mt()
1559 coder->sequence = SEQ_ERROR; in stream_decode_mt()
1564 if (coder->thr->in_filled < coder->thr->in_size) { in stream_decode_mt()
1571 coder->thr = NULL; in stream_decode_mt()
1572 coder->sequence = SEQ_BLOCK_HEADER; in stream_decode_mt()
1585 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1588 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1592 lzma_outq_clear_cache(&coder->outq, allocator); in stream_decode_mt()
1596 threads_end(coder, allocator); in stream_decode_mt()
1600 &coder->block_decoder, allocator, in stream_decode_mt()
1601 &coder->block_options); in stream_decode_mt()
1605 lzma_filters_free(coder->filters, allocator); in stream_decode_mt()
1606 coder->block_options.filters = NULL; in stream_decode_mt()
1613 coder->mem_direct_mode = coder->mem_next_filters; in stream_decode_mt()
1615 coder->sequence = SEQ_BLOCK_DIRECT_RUN; in stream_decode_mt()
1623 const lzma_ret ret = coder->block_decoder.code( in stream_decode_mt()
1624 coder->block_decoder.coder, allocator, in stream_decode_mt()
1627 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1628 coder->progress_out += *out_pos - out_old; in stream_decode_mt()
1635 return_if_error(lzma_index_hash_append(coder->index_hash, in stream_decode_mt()
1637 &coder->block_options), in stream_decode_mt()
1638 coder->block_options.uncompressed_size)); in stream_decode_mt()
1640 coder->sequence = SEQ_BLOCK_HEADER; in stream_decode_mt()
1647 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1651 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1654 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()
1682 lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos, in stream_decode_mt()
1684 coder->progress_in += *in_pos - in_old; in stream_decode_mt()
1687 if (coder->pos < LZMA_STREAM_HEADER_SIZE) in stream_decode_mt()
1690 coder->pos = 0; in stream_decode_mt()
1697 &footer_flags, coder->buffer); in stream_decode_mt()
1704 if (lzma_index_hash_size(coder->index_hash) in stream_decode_mt()
1711 &coder->stream_flags, &footer_flags)); in stream_decode_mt()
1713 if (!coder->concatenated) in stream_decode_mt()
1716 coder->sequence = SEQ_STREAM_PADDING; in stream_decode_mt()
1722 assert(coder->concatenated); in stream_decode_mt()
1734 return coder->pos == 0 in stream_decode_mt()
1745 ++coder->progress_in; in stream_decode_mt()
1746 coder->pos = (coder->pos + 1) & 3; in stream_decode_mt()
1751 if (coder->pos != 0) { in stream_decode_mt()
1753 ++coder->progress_in; in stream_decode_mt()
1758 return_if_error(stream_decoder_reset(coder, allocator)); in stream_decode_mt()
1762 if (!coder->fail_fast) { in stream_decode_mt()
1771 return_if_error(read_output_and_wait(coder, allocator, in stream_decode_mt()
1777 if (!lzma_outq_is_empty(&coder->outq)) in stream_decode_mt()
1784 return coder->pending_error; in stream_decode_mt()
1798 struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_end() local
1800 threads_end(coder, allocator); in stream_decoder_mt_end()
1801 lzma_outq_end(&coder->outq, allocator); in stream_decoder_mt_end()
1803 lzma_next_end(&coder->block_decoder, allocator); in stream_decoder_mt_end()
1804 lzma_filters_free(coder->filters, allocator); in stream_decoder_mt_end()
1805 lzma_index_hash_end(coder->index_hash, allocator); in stream_decoder_mt_end()
1807 lzma_free(coder, allocator); in stream_decoder_mt_end()
1815 const struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_get_check() local
1816 return coder->stream_flags.check; in stream_decoder_mt_get_check()
1840 struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_memconfig() local
1842 mythread_sync(coder->mutex) { in stream_decoder_mt_memconfig()
1843 *memusage = coder->mem_direct_mode in stream_decoder_mt_memconfig()
1844 + coder->mem_in_use in stream_decoder_mt_memconfig()
1845 + coder->mem_cached in stream_decoder_mt_memconfig()
1846 + coder->outq.mem_allocated; in stream_decoder_mt_memconfig()
1854 *old_memlimit = coder->memlimit_stop; in stream_decoder_mt_memconfig()
1860 coder->memlimit_stop = new_memlimit; in stream_decoder_mt_memconfig()
1871 struct lzma_stream_coder *coder = coder_ptr; in stream_decoder_mt_get_progress() local
1875 mythread_sync(coder->mutex) { in stream_decoder_mt_get_progress()
1876 *progress_in = coder->progress_in; in stream_decoder_mt_get_progress()
1877 *progress_out = coder->progress_out; in stream_decoder_mt_get_progress()
1879 for (size_t i = 0; i < coder->threads_initialized; ++i) { in stream_decoder_mt_get_progress()
1880 mythread_sync(coder->threads[i].mutex) { in stream_decoder_mt_get_progress()
1881 *progress_in += coder->threads[i].progress_in; in stream_decoder_mt_get_progress()
1882 *progress_out += coder->threads[i] in stream_decoder_mt_get_progress()
1896 struct lzma_stream_coder *coder; in stream_decoder_mt_init() local
1906 coder = next->coder; in stream_decoder_mt_init()
1907 if (!coder) { in stream_decoder_mt_init()
1908 coder = lzma_alloc(sizeof(struct lzma_stream_coder), allocator); in stream_decoder_mt_init()
1909 if (coder == NULL) in stream_decoder_mt_init()
1912 next->coder = coder; in stream_decoder_mt_init()
1914 if (mythread_mutex_init(&coder->mutex)) { in stream_decoder_mt_init()
1915 lzma_free(coder, allocator); in stream_decoder_mt_init()
1919 if (mythread_cond_init(&coder->cond)) { in stream_decoder_mt_init()
1920 mythread_mutex_destroy(&coder->mutex); in stream_decoder_mt_init()
1921 lzma_free(coder, allocator); in stream_decoder_mt_init()
1931 coder->filters[0].id = LZMA_VLI_UNKNOWN; in stream_decoder_mt_init()
1932 memzero(&coder->outq, sizeof(coder->outq)); in stream_decoder_mt_init()
1934 coder->block_decoder = LZMA_NEXT_CODER_INIT; in stream_decoder_mt_init()
1935 coder->mem_direct_mode = 0; in stream_decoder_mt_init()
1937 coder->index_hash = NULL; in stream_decoder_mt_init()
1938 coder->threads = NULL; in stream_decoder_mt_init()
1939 coder->threads_free = NULL; in stream_decoder_mt_init()
1940 coder->threads_initialized = 0; in stream_decoder_mt_init()
1945 lzma_filters_free(coder->filters, allocator); in stream_decoder_mt_init()
1960 threads_end(coder, allocator); in stream_decoder_mt_init()
1968 coder->mem_in_use = 0; in stream_decoder_mt_init()
1969 coder->mem_cached = 0; in stream_decoder_mt_init()
1970 coder->mem_next_block = 0; in stream_decoder_mt_init()
1972 coder->progress_in = 0; in stream_decoder_mt_init()
1973 coder->progress_out = 0; in stream_decoder_mt_init()
1975 coder->sequence = SEQ_STREAM_HEADER; in stream_decoder_mt_init()
1976 coder->thread_error = LZMA_OK; in stream_decoder_mt_init()
1977 coder->pending_error = LZMA_OK; in stream_decoder_mt_init()
1978 coder->thr = NULL; in stream_decoder_mt_init()
1980 coder->timeout = options->timeout; in stream_decoder_mt_init()
1982 coder->memlimit_threading = my_max(1, options->memlimit_threading); in stream_decoder_mt_init()
1983 coder->memlimit_stop = my_max(1, options->memlimit_stop); in stream_decoder_mt_init()
1984 if (coder->memlimit_threading > coder->memlimit_stop) in stream_decoder_mt_init()
1985 coder->memlimit_threading = coder->memlimit_stop; in stream_decoder_mt_init()
1987 coder->tell_no_check = (options->flags & LZMA_TELL_NO_CHECK) != 0; in stream_decoder_mt_init()
1988 coder->tell_unsupported_check in stream_decoder_mt_init()
1990 coder->tell_any_check = (options->flags & LZMA_TELL_ANY_CHECK) != 0; in stream_decoder_mt_init()
1991 coder->ignore_check = (options->flags & LZMA_IGNORE_CHECK) != 0; in stream_decoder_mt_init()
1992 coder->concatenated = (options->flags & LZMA_CONCATENATED) != 0; in stream_decoder_mt_init()
1993 coder->fail_fast = (options->flags & LZMA_FAIL_FAST) != 0; in stream_decoder_mt_init()
1995 coder->first_stream = true; in stream_decoder_mt_init()
1996 coder->out_was_filled = false; in stream_decoder_mt_init()
1997 coder->pos = 0; in stream_decoder_mt_init()
1999 coder->threads_max = options->threads; in stream_decoder_mt_init()
2001 return_if_error(lzma_outq_init(&coder->outq, allocator, in stream_decoder_mt_init()
2002 coder->threads_max)); in stream_decoder_mt_init()
2004 return stream_decoder_reset(coder, allocator); in stream_decoder_mt_init()