![]() |
libxcoder
3.5.1
|
Exported utility routines. More...
Go to the source code of this file.
Functions | |
int32_t | ni_logan_gettimeofday (struct timeval *p_tp, void *p_tzp) |
uint64_t | ni_logan_gettime_ns (void) |
uint32_t | ni_logan_round_up (uint32_t number_to_round, uint32_t multiple) |
int32_t | ni_logan_posix_memalign (void **pp_memptr, size_t alignment, size_t size) |
void | ni_logan_usleep (int64_t usec) |
ni_logan_buf_t * | ni_logan_buf_pool_expand (ni_logan_buf_pool_t *pool) |
ni_logan_buf_t * | ni_logan_buf_pool_get_buffer (ni_logan_buf_pool_t *p_buffer_pool) |
get a free memory buffer from the pool More... | |
void | ni_logan_buf_pool_return_buffer (ni_logan_buf_t *buf, ni_logan_buf_pool_t *p_buffer_pool) |
return a used memory buffer to the pool More... | |
ni_logan_buf_t * | ni_logan_buf_pool_allocate_buffer (ni_logan_buf_pool_t *p_buffer_pool, int buffer_size) |
allocate a memory buffer and place it in the pool More... | |
int32_t | ni_logan_dec_fme_buffer_pool_initialize (ni_logan_session_context_t *p_ctx, int32_t number_of_buffers, int width, int height, int height_align, int factor) |
decoder frame buffer pool init & free More... | |
void | ni_logan_dec_fme_buffer_pool_free (ni_logan_buf_pool_t *p_buffer_pool) |
free decoder frame buffer pool More... | |
void | ni_logan_buffer_pool_free (ni_logan_queue_buffer_pool_t *p_buffer_pool) |
free buffer memory pool More... | |
ni_logan_queue_node_t * | ni_logan_buffer_pool_allocate_buffer (ni_logan_queue_buffer_pool_t *p_buffer_pool) |
int32_t | ni_logan_buffer_pool_initialize (ni_logan_session_context_t *p_ctx, int32_t number_of_buffers) |
ni_logan_queue_node_t * | ni_logan_buffer_pool_expand (ni_logan_queue_buffer_pool_t *pool) |
ni_logan_queue_node_t * | ni_logan_buffer_pool_get_queue_buffer (ni_logan_queue_buffer_pool_t *p_buffer_pool) |
void | ni_logan_buffer_pool_return_buffer (ni_logan_queue_node_t *buf, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
ni_logan_retcode_t | ni_logan_find_blk_name (const char *p_dev, char *p_out_buf, int out_buf_len) |
Find NVMe name space block from device name If none is found, assume nvme multi-pathing is disabled and return /dev/nvmeXn1. More... | |
ni_logan_retcode_t | ni_logan_timestamp_init (ni_logan_session_context_t *p_ctx, ni_logan_timestamp_table_t **pp_table, const char *name) |
Initialize timestamp handling. More... | |
ni_logan_retcode_t | ni_logan_timestamp_done (ni_logan_timestamp_table_t *p_table, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Clean up timestamp handling. More... | |
ni_logan_retcode_t | ni_logan_timestamp_register (ni_logan_queue_buffer_pool_t *p_buffer_pool, ni_logan_timestamp_table_t *p_table, int64_t timestamp, uint64_t data_info) |
Register timestamp in timestamp/frameoffset table. More... | |
ni_logan_retcode_t | ni_logan_timestamp_get (ni_logan_timestamp_table_t *p_table, uint64_t frame_info, int64_t *p_timestamp, int32_t threshold, int32_t print, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Retrieve timestamp from table based on frameoffset info. More... | |
ni_logan_retcode_t | ni_logan_timestamp_get_with_threshold (ni_logan_timestamp_table_t *p_table, uint64_t frame_info, int64_t *p_timestamp, int32_t threshold, int32_t print, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Retrieve timestamp from table based on frame offset info with respect to threshold. More... | |
void | ni_logan_timestamp_scan_cleanup (ni_logan_timestamp_table_t *pts_list, ni_logan_timestamp_table_t *dts_list, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Timestamp queue clean up. More... | |
ni_logan_retcode_t | ni_logan_timestamp_get_v2 (ni_logan_timestamp_table_t *p_table, uint64_t frame_offset, int64_t *p_timestamp, int32_t threshold, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Retrieve timestamp from table based on frameoffset info. More... | |
ni_logan_retcode_t | ni_logan_queue_init (ni_logan_session_context_t *p_ctx, ni_logan_queue_t *p_queue, const char *name) |
Initialize xcoder queue. More... | |
ni_logan_retcode_t | ni_logan_queue_push (ni_logan_queue_buffer_pool_t *p_buffer_pool, ni_logan_queue_t *p_queue, uint64_t frame_info, int64_t timestamp) |
Push into xcoder queue. More... | |
ni_logan_retcode_t | ni_logan_queue_pop (ni_logan_queue_t *p_queue, uint64_t frame_info, int64_t *p_timestamp, int32_t threshold, int32_t print, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Pop from the xcoder queue. More... | |
ni_logan_retcode_t | ni_logan_queue_pop_threshold (ni_logan_queue_t *p_queue, uint64_t frame_info, int64_t *p_timestamp, int32_t threshold, int32_t print, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Pop from the xcoder queue with respect to threshold. More... | |
ni_logan_retcode_t | ni_logan_queue_free (ni_logan_queue_t *p_queue, ni_logan_queue_buffer_pool_t *p_buffer_pool) |
Free xcoder queue. More... | |
ni_logan_retcode_t | ni_logan_queue_print (ni_logan_queue_t *p_queue) |
Print xcoder queue info. More... | |
ni_logan_fifo_buffer_t * | ni_logan_fifo_initialize (uint32_t number_of_buffers, uint32_t size) |
Initialize a fifo buffer. More... | |
void | ni_logan_fifo_free (ni_logan_fifo_buffer_t *p_fifo) |
Free a fifo. More... | |
int | ni_logan_fifo_is_full (ni_logan_fifo_buffer_t *p_fifo) |
Check if a fifo is full. More... | |
int | ni_logan_fifo_is_empty (ni_logan_fifo_buffer_t *p_fifo) |
Check if a fifo is empty. More... | |
uint8_t * | ni_logan_fifo_generic_write (ni_logan_fifo_buffer_t *p_fifo) |
Get free buffer to write in the fifo. More... | |
uint8_t * | ni_logan_fifo_generic_read (ni_logan_fifo_buffer_t *p_fifo) |
Get first filled buffer to read in the fifo. More... | |
int | ni_logan_fifo_return_read (ni_logan_fifo_buffer_t *p_fifo) |
Push back the last read buffer to the fifo. More... | |
int32_t | ni_logan_atobool (const char *p_str, bool *b_error) |
Convert string to boolean. More... | |
int32_t | ni_logan_atoi (const char *p_str, bool *b_error) |
Convert string to integer. More... | |
double | ni_logan_atof (const char *p_str, bool *b_error) |
Convert string to floating. More... | |
int32_t | ni_logan_parse_name (const char *arg, const char *const *names, bool *b_error) |
Parse name. More... | |
void * | thread_routine (void *arg) |
threadpool control More... | |
void | threadpool_init (threadpool_t *pool) |
Init the threadpool. More... | |
int | threadpool_auto_add_task_thread (threadpool_t *pool, void *(*run)(void *arg), void *arg, int newThread) |
add task to threadpool using newThread control it More... | |
int | threadpool_add_task (threadpool_t *pool, void *(*run)(void *arg), void *arg) |
add task to threadpool More... | |
void | threadpool_destroy (threadpool_t *pool) |
destroy threadpool More... | |
void | ni_logan_get_hw_yuv420p_dim (int width, int height, int bit_depth_factor, int is_h264, int plane_stride[NI_LOGAN_MAX_NUM_DATA_POINTERS], int plane_height[NI_LOGAN_MAX_NUM_DATA_POINTERS]) |
Get dimension information of Netint HW YUV420p frame to be sent to encoder for encoding. Caller usually retrieves this info and uses it in the call to ni_logan_encoder_frame_buffer_alloc for buffer allocation. More... | |
void | ni_logan_copy_hw_yuv420p (uint8_t *p_dst[NI_LOGAN_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_LOGAN_MAX_NUM_DATA_POINTERS], int frame_width, int frame_height, int bit_depth_factor, int dst_stride[NI_LOGAN_MAX_NUM_DATA_POINTERS], int dst_height[NI_LOGAN_MAX_NUM_DATA_POINTERS], int src_stride[NI_LOGAN_MAX_NUM_DATA_POINTERS], int src_height[NI_LOGAN_MAX_NUM_DATA_POINTERS]) |
Copy YUV data to Netint HW YUV420p frame layout to be sent to encoder for encoding. Data buffer (dst) is usually allocated by ni_logan_encoder_frame_buffer_alloc. More... | |
int | ni_logan_insert_emulation_prevent_bytes (uint8_t *buf, int size) |
Insert emulation prevention byte(s) as needed into the data buffer. More... | |
LIB_API int | ni_logan_remove_emulation_prevent_bytes (uint8_t *buf, int size) |
Remove emulation prevention byte(s) as needed from the data buffer. More... | |
void | ni_logan_overwrite_specified_pos (uint8_t *buf, int pos, int value) |
overwrite the 32 bits of integer value at bit position pos More... | |
int32_t ni_logan_atobool | ( | const char * | p_str, |
bool * | b_error | ||
) |
Convert string to boolean.
convert string to boolean
Definition at line 1986 of file ni_util_logan.c.
double ni_logan_atof | ( | const char * | p_str, |
bool * | b_error | ||
) |
Convert string to floating.
convert string to float
Definition at line 2033 of file ni_util_logan.c.
int32_t ni_logan_atoi | ( | const char * | p_str, |
bool * | b_error | ||
) |
Convert string to integer.
convert string to integer
Definition at line 2013 of file ni_util_logan.c.
ni_logan_buf_t* ni_logan_buf_pool_allocate_buffer | ( | ni_logan_buf_pool_t * | p_buffer_pool, |
int | buffer_size | ||
) |
allocate a memory buffer and place it in the pool
Definition at line 516 of file ni_util_logan.c.
ni_logan_buf_t* ni_logan_buf_pool_expand | ( | ni_logan_buf_pool_t * | pool | ) |
Definition at line 348 of file ni_util_logan.c.
ni_logan_buf_t* ni_logan_buf_pool_get_buffer | ( | ni_logan_buf_pool_t * | p_buffer_pool | ) |
void ni_logan_buf_pool_return_buffer | ( | ni_logan_buf_t * | buf, |
ni_logan_buf_pool_t * | p_buffer_pool | ||
) |
ni_logan_queue_node_t* ni_logan_buffer_pool_allocate_buffer | ( | ni_logan_queue_buffer_pool_t * | p_buffer_pool | ) |
Definition at line 747 of file ni_util_logan.c.
ni_logan_queue_node_t* ni_logan_buffer_pool_expand | ( | ni_logan_queue_buffer_pool_t * | pool | ) |
Definition at line 815 of file ni_util_logan.c.
void ni_logan_buffer_pool_free | ( | ni_logan_queue_buffer_pool_t * | p_buffer_pool | ) |
ni_logan_queue_node_t* ni_logan_buffer_pool_get_queue_buffer | ( | ni_logan_queue_buffer_pool_t * | p_buffer_pool | ) |
Definition at line 831 of file ni_util_logan.c.
int32_t ni_logan_buffer_pool_initialize | ( | ni_logan_session_context_t * | p_ctx, |
int32_t | number_of_buffers | ||
) |
Definition at line 775 of file ni_util_logan.c.
void ni_logan_buffer_pool_return_buffer | ( | ni_logan_queue_node_t * | buf, |
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
Definition at line 886 of file ni_util_logan.c.
void ni_logan_copy_hw_yuv420p | ( | uint8_t * | p_dst[NI_LOGAN_MAX_NUM_DATA_POINTERS], |
uint8_t * | p_src[NI_LOGAN_MAX_NUM_DATA_POINTERS], | ||
int | frame_width, | ||
int | frame_height, | ||
int | bit_depth_factor, | ||
int | dst_stride[NI_LOGAN_MAX_NUM_DATA_POINTERS], | ||
int | dst_height[NI_LOGAN_MAX_NUM_DATA_POINTERS], | ||
int | src_stride[NI_LOGAN_MAX_NUM_DATA_POINTERS], | ||
int | src_height[NI_LOGAN_MAX_NUM_DATA_POINTERS] | ||
) |
Copy YUV data to Netint HW YUV420p frame layout to be sent to encoder for encoding. Data buffer (dst) is usually allocated by ni_logan_encoder_frame_buffer_alloc.
[out] | p_dst | pointers of Y/Cb/Cr to which data is copied |
[in] | p_src | pointers of Y/Cb/Cr from which data is copied |
[in] | width | source YUV frame width |
[in] | height | source YUV frame height |
[in] | bit_depth_factor | 1 for 8 bit, 2 for 10 bit |
[in] | dst_stride | size (in bytes) of each plane width in destination |
[in] | dst_height | size of each plane height in destination |
[in] | src_stride | size (in bytes) of each plane width in source |
[in] | src_height | size of each plane height in source |
Definition at line 2397 of file ni_util_logan.c.
void ni_logan_dec_fme_buffer_pool_free | ( | ni_logan_buf_pool_t * | p_buffer_pool | ) |
int32_t ni_logan_dec_fme_buffer_pool_initialize | ( | ni_logan_session_context_t * | p_ctx, |
int32_t | number_of_buffers, | ||
int | width, | ||
int | height, | ||
int | height_align, | ||
int | factor | ||
) |
void ni_logan_fifo_free | ( | ni_logan_fifo_buffer_t * | p_fifo | ) |
Free a fifo.
[in] | p_fifo | The pointer of ni_logan_fifo_buffer_t |
Definition at line 1852 of file ni_util_logan.c.
uint8_t* ni_logan_fifo_generic_read | ( | ni_logan_fifo_buffer_t * | p_fifo | ) |
Get first filled buffer to read in the fifo.
[in] | p_fifo | The pointer of ni_logan_fifo_buffer_t |
Definition at line 1932 of file ni_util_logan.c.
uint8_t* ni_logan_fifo_generic_write | ( | ni_logan_fifo_buffer_t * | p_fifo | ) |
Get free buffer to write in the fifo.
[in] | p_fifo | The pointer of ni_logan_fifo_buffer_t |
Definition at line 1903 of file ni_util_logan.c.
ni_logan_fifo_buffer_t* ni_logan_fifo_initialize | ( | uint32_t | number_of_buffers, |
uint32_t | size | ||
) |
Initialize a fifo buffer.
[in] | number_of_buffers | Total number of buffers in this fifo |
[in] | size | The size of every buffer |
Definition at line 1812 of file ni_util_logan.c.
int ni_logan_fifo_is_empty | ( | ni_logan_fifo_buffer_t * | p_fifo | ) |
Check if a fifo is empty.
[in] | p_fifo | The pointer of ni_logan_fifo_buffer_t |
Definition at line 1890 of file ni_util_logan.c.
int ni_logan_fifo_is_full | ( | ni_logan_fifo_buffer_t * | p_fifo | ) |
Check if a fifo is full.
[in] | p_fifo | The pointer of ni_logan_fifo_buffer_t |
Definition at line 1878 of file ni_util_logan.c.
int ni_logan_fifo_return_read | ( | ni_logan_fifo_buffer_t * | p_fifo | ) |
Push back the last read buffer to the fifo.
[in] | p_fifo | The pointer of ni_logan_fifo_buffer_t |
Definition at line 1960 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_find_blk_name | ( | const char * | p_dev, |
char * | p_out_buf, | ||
int | out_buf_len | ||
) |
Find NVMe name space block from device name If none is found, assume nvme multi-pathing is disabled and return /dev/nvmeXn1.
[in] | p_dev | Device name represented as c string. ex: "/dev/nvme0" |
[out] | p_out_buf | Output buffer to put NVMe name space block. Must be at least length 21 |
[in] | out_buf_len | Length of memory allocated to p_out_buf |
Definition at line 1060 of file ni_util_logan.c.
void ni_logan_get_hw_yuv420p_dim | ( | int | width, |
int | height, | ||
int | bit_depth_factor, | ||
int | is_h264, | ||
int | plane_stride[NI_LOGAN_MAX_NUM_DATA_POINTERS], | ||
int | plane_height[NI_LOGAN_MAX_NUM_DATA_POINTERS] | ||
) |
Get dimension information of Netint HW YUV420p frame to be sent to encoder for encoding. Caller usually retrieves this info and uses it in the call to ni_logan_encoder_frame_buffer_alloc for buffer allocation.
[in] | width | source YUV frame width |
[in] | height | source YUV frame height |
[in] | bit_depth_factor | 1 for 8 bit, 2 for 10 bit |
[in] | is_h264 | non-0 for H.264 codec, 0 otherwise (H.265) |
[out] | plane_stride | size (in bytes) of each plane width |
[out] | plane_height | size of each plane height |
Definition at line 2352 of file ni_util_logan.c.
uint64_t ni_logan_gettime_ns | ( | void | ) |
Definition at line 81 of file ni_util_logan.c.
int32_t ni_logan_gettimeofday | ( | struct timeval * | p_tp, |
void * | p_tzp | ||
) |
timezone information is stored outside the kernel so tzp isn't used anymore.
Note: this function is not for Win32 high precision timing purpose. See elapsed_time().
Definition at line 56 of file ni_util_logan.c.
int ni_logan_insert_emulation_prevent_bytes | ( | uint8_t * | buf, |
int | size | ||
) |
Insert emulation prevention byte(s) as needed into the data buffer.
buf | data buffer to be worked on - new byte(s) will be inserted size number of bytes starting from buf to check |
Note: caller MUST ensure for newly inserted bytes, buf has enough free space starting from buf + size
Definition at line 2511 of file ni_util_logan.c.
void ni_logan_overwrite_specified_pos | ( | uint8_t * | buf, |
int | pos, | ||
int | value | ||
) |
overwrite the 32 bits of integer value at bit position pos
buf | data buffer to be worked on pos the position to be modified value The value that needs to be modified to |
Note: caller MUST ensure that the pos and value won't go beyond the memory boundary of data. otherwise memory corruption would occur.
Definition at line 2616 of file ni_util_logan.c.
int32_t ni_logan_parse_name | ( | const char * | arg, |
const char *const * | names, | ||
bool * | b_error | ||
) |
int32_t ni_logan_posix_memalign | ( | void ** | pp_memptr, |
size_t | alignment, | ||
size_t | size | ||
) |
Definition at line 122 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_queue_free | ( | ni_logan_queue_t * | p_queue, |
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
ni_logan_retcode_t ni_logan_queue_init | ( | ni_logan_session_context_t * | p_ctx, |
ni_logan_queue_t * | p_queue, | ||
const char * | name | ||
) |
ni_logan_retcode_t ni_logan_queue_pop | ( | ni_logan_queue_t * | p_queue, |
uint64_t | frame_info, | ||
int64_t * | p_timestamp, | ||
int32_t | threshold, | ||
int32_t | print, | ||
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
Pop from the xcoder queue.
If only one entry, retrieve timestamp without checking
Definition at line 1496 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_queue_pop_threshold | ( | ni_logan_queue_t * | p_queue, |
uint64_t | frame_offset, | ||
int64_t * | p_timestamp, | ||
int32_t | threshold, | ||
int32_t | print, | ||
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
Pop from the xcoder queue with respect to threshold.
If only one entry, retrieve timestamp without checking
Definition at line 1614 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_queue_print | ( | ni_logan_queue_t * | p_queue | ) |
Print xcoder queue info.
Print xcoder queue.
Definition at line 1758 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_queue_push | ( | ni_logan_queue_buffer_pool_t * | p_buffer_pool, |
ni_logan_queue_t * | p_queue, | ||
uint64_t | frame_info, | ||
int64_t | timestamp | ||
) |
LIB_API int ni_logan_remove_emulation_prevent_bytes | ( | uint8_t * | buf, |
int | size | ||
) |
Remove emulation prevention byte(s) as needed from the data buffer.
buf | data buffer to be worked on - emu prevent byte(s) will be removed from. size number of bytes starting from buf to check |
Note: buf will be modified if emu prevent byte(s) found and removed.
Definition at line 2564 of file ni_util_logan.c.
uint32_t ni_logan_round_up | ( | uint32_t | number_to_round, |
uint32_t | multiple | ||
) |
Definition at line 104 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_timestamp_done | ( | ni_logan_timestamp_table_t * | p_table, |
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
ni_logan_retcode_t ni_logan_timestamp_get | ( | ni_logan_timestamp_table_t * | p_table, |
uint64_t | frame_info, | ||
int64_t * | p_timestamp, | ||
int32_t | threshold, | ||
int32_t | print, | ||
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
Retrieve timestamp from table based on frameoffset info.
Retrieve timestamp from table based on frame offset info.
Definition at line 1277 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_timestamp_get_v2 | ( | ni_logan_timestamp_table_t * | p_table, |
uint64_t | frame_offset, | ||
int64_t * | p_timestamp, | ||
int32_t | threshold, | ||
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
Retrieve timestamp from table based on frameoffset info.
Retrieve timestamp from table based on frame offset info.
Definition at line 1358 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_timestamp_get_with_threshold | ( | ni_logan_timestamp_table_t * | p_table, |
uint64_t | frame_info, | ||
int64_t * | p_timestamp, | ||
int32_t | threshold, | ||
int32_t | print, | ||
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
Retrieve timestamp from table based on frame offset info with respect to threshold.
Definition at line 1301 of file ni_util_logan.c.
ni_logan_retcode_t ni_logan_timestamp_init | ( | ni_logan_session_context_t * | p_ctx, |
ni_logan_timestamp_table_t ** | pp_table, | ||
const char * | name | ||
) |
ni_logan_retcode_t ni_logan_timestamp_register | ( | ni_logan_queue_buffer_pool_t * | p_buffer_pool, |
ni_logan_timestamp_table_t * | p_table, | ||
int64_t | timestamp, | ||
uint64_t | data_info | ||
) |
Register timestamp in timestamp/frameoffset table.
Register timestamp in timestamp/frame offset table.
Definition at line 1249 of file ni_util_logan.c.
void ni_logan_timestamp_scan_cleanup | ( | ni_logan_timestamp_table_t * | pts_list, |
ni_logan_timestamp_table_t * | dts_list, | ||
ni_logan_queue_buffer_pool_t * | p_buffer_pool | ||
) |
void ni_logan_usleep | ( | int64_t | usec | ) |
Definition at line 295 of file ni_util_logan.c.
void* thread_routine | ( | void * | arg | ) |
threadpool control
[in] | params |
Definition at line 2076 of file ni_util_logan.c.
int threadpool_add_task | ( | threadpool_t * | pool, |
void *(*)(void *arg) | run, | ||
void * | arg | ||
) |
add task to threadpool
[in] | pool | threadpool address |
[in] | run | run function |
[in] | arg | run function params |
Definition at line 2241 of file ni_util_logan.c.
int threadpool_auto_add_task_thread | ( | threadpool_t * | pool, |
void *(*)(void *arg) | run, | ||
void * | arg, | ||
int | newThread | ||
) |
add task to threadpool using newThread control it
[in] | pool | threadpool address |
[in] | run | run function |
[in] | arg | run function params |
[in] | newThread | 1: create a new thread. 0: do not create a new thread. |
Definition at line 2159 of file ni_util_logan.c.
void threadpool_destroy | ( | threadpool_t * | pool | ) |
destroy threadpool
[in] | pool | threadpool address |
Definition at line 2303 of file ni_util_logan.c.
void threadpool_init | ( | threadpool_t * | pool | ) |
Init the threadpool.
[in] | pool | threadpool address |
Definition at line 2133 of file ni_util_logan.c.