XZ Utils 5.3.3alpha
|
Data Fields | |
worker_state | state |
Worker state is protected with our mutex. More... | |
uint8_t * | in |
Input buffer that will contain the whole Block except Block Header. More... | |
size_t | in_size |
Amount of memory allocated for "in". More... | |
size_t | in_filled |
Number of bytes written to "in" by the main thread. More... | |
size_t | in_pos |
Number of bytes consumed from "in" by the worker thread. More... | |
size_t | out_pos |
struct lzma_stream_coder * | coder |
const lzma_allocator * | allocator |
lzma_outbuf * | outbuf |
Output queue buffer to which the uncompressed data is written. More... | |
size_t | progress_in |
size_t | progress_out |
Like progress_in but for uncompressed data. More... | |
partial_update_mode | partial_update |
lzma_next_coder | block_decoder |
Block decoder. More... | |
lzma_block | block_options |
uint64_t | mem_filters |
Filter chain memory usage. More... | |
struct worker_thread * | next |
Next structure in the stack of free worker threads. More... | |
mythread_mutex | mutex |
mythread_cond | cond |
mythread | thread_id |
worker_state worker_thread::state |
Worker state is protected with our mutex.
Referenced by threads_stop().
uint8_t* worker_thread::in |
Input buffer that will contain the whole Block except Block Header.
size_t worker_thread::in_size |
Amount of memory allocated for "in".
Referenced by worker_stop().
size_t worker_thread::in_filled |
Number of bytes written to "in" by the main thread.
size_t worker_thread::in_pos |
Number of bytes consumed from "in" by the worker thread.
size_t worker_thread::out_pos |
Amount of uncompressed data that has been decoded. This local copy is needed because updating outbuf->pos requires locking the main mutex (coder->mutex).
struct lzma_stream_coder* worker_thread::coder |
Pointer to the main structure is needed to (1) lock the main mutex (coder->mutex) when updating outbuf->pos and (2) when putting this thread back to the stack of free threads.
Referenced by comp_blk_size(), and worker_stop().
const lzma_allocator* worker_thread::allocator |
The allocator is set by the main thread. Since a copy of the pointer is kept here, the application must not change the allocator before calling lzma_end().
lzma_outbuf* worker_thread::outbuf |
Output queue buffer to which the uncompressed data is written.
size_t worker_thread::progress_in |
Amount of compressed data that has already been decompressed. This is updated from in_pos when our mutex is locked. This is size_t, not uint64_t, because per-thread progress is limited to sizes of allocated buffers.
size_t worker_thread::progress_out |
Like progress_in but for uncompressed data.
partial_update_mode worker_thread::partial_update |
Updating outbuf->pos requires locking the main mutex (coder->mutex). Since the main thread will only read output from the oldest outbuf in the queue, only the worker thread that is associated with the oldest outbuf needs to update its outbuf->pos. This avoids useless mutex contention that would happen if all worker threads were frequently locking the main mutex to update their outbuf->pos.
Only when partial_update is something else than PARTIAL_DISABLED, this worker thread will update outbuf->pos after each call to the Block decoder.
Referenced by worker_enable_partial_update().
lzma_next_coder worker_thread::block_decoder |
Block decoder.
lzma_block worker_thread::block_options |
Thread-specific Block options are needed because the Block decoder modifies the struct given to it at initialization.
uint64_t worker_thread::mem_filters |
Filter chain memory usage.
Referenced by worker_stop().
struct worker_thread* worker_thread::next |
Next structure in the stack of free worker threads.
Referenced by worker_stop().
mythread worker_thread::thread_id |
The ID of this thread is used to join the thread when it's not needed anymore.