Rizin
unix-like reverse engineering framework and cli tools
worker_thread_s Struct Reference

Public Attributes

worker_state state
 
uint8_tin
 
size_t in_size
 
lzma_outbufoutbuf
 
lzma_stream_codercoder
 
const lzma_allocatorallocator
 
uint64_t progress_in
 Amount of uncompressed data that has already been compressed. More...
 
uint64_t progress_out
 Amount of compressed data that is ready. More...
 
lzma_next_coder block_encoder
 Block encoder. More...
 
lzma_block block_options
 Compression options for this Block. More...
 
worker_threadnext
 Next structure in the stack of free worker threads. More...
 
mythread_mutex mutex
 
mythread_cond cond
 
mythread thread_id
 

Detailed Description

Definition at line 50 of file stream_encoder_mt.c.

Member Data Documentation

◆ allocator

const lzma_allocator* worker_thread_s::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().

Definition at line 74 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ block_encoder

lzma_next_coder worker_thread_s::block_encoder

Block encoder.

Definition at line 83 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ block_options

lzma_block worker_thread_s::block_options

Compression options for this Block.

Definition at line 86 of file stream_encoder_mt.c.

Referenced by worker_encode().

◆ coder

lzma_stream_coder* worker_thread_s::coder

Pointer to the main structure is needed when putting this thread back to the stack of free threads.

Definition at line 69 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), worker_error(), and worker_start().

◆ cond

mythread_cond worker_thread_s::cond

Definition at line 92 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ in

uint8_t* worker_thread_s::in

Input buffer of coder->block_size bytes. The main thread will put new input into this and update in_size accordingly. Once no more input is coming, state will be set to THR_FINISH.

Definition at line 56 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ in_size

size_t worker_thread_s::in_size

Amount of data available in the input buffer. This is modified only by the main thread.

Definition at line 60 of file stream_encoder_mt.c.

Referenced by worker_encode().

◆ mutex

mythread_mutex worker_thread_s::mutex

Definition at line 91 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ next

worker_thread* worker_thread_s::next

Next structure in the stack of free worker threads.

Definition at line 89 of file stream_encoder_mt.c.

Referenced by worker_start().

◆ outbuf

lzma_outbuf* worker_thread_s::outbuf

Output buffer for this thread. This is set by the main thread every time a new Block is started with this thread structure.

Definition at line 65 of file stream_encoder_mt.c.

Referenced by worker_encode(), and worker_start().

◆ progress_in

uint64_t worker_thread_s::progress_in

Amount of uncompressed data that has already been compressed.

Definition at line 77 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ progress_out

uint64_t worker_thread_s::progress_out

Amount of compressed data that is ready.

Definition at line 80 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ state

worker_state worker_thread_s::state

Definition at line 51 of file stream_encoder_mt.c.

Referenced by initialize_new_thread(), worker_encode(), and worker_start().

◆ thread_id

mythread worker_thread_s::thread_id

The ID of this thread is used to join the thread when it's not needed anymore.

Definition at line 96 of file stream_encoder_mt.c.

Referenced by initialize_new_thread().


The documentation for this struct was generated from the following file: