mtree_build - build a merkle tree from base data
Contents
Bugs
No error handling.
Description
The mtree_build function builds a merkle tree tree which was previously initialized with mtree_init(3)
from the base data pointed to by data.
If q is not NULL, it must point to a queue q_t structure previously initialized with q_init(3). This
queue will have jobs enqueued to build the tree. This is normally used in conjunction with a threadpool
created with q_pool_create(3) with threads all calling q_job_seek(3).
If q is NULL, the creation and destruction of a queue and threadpool will be handled automatically.
Errors
TODO
Example
TODO
Library
Librecast library (liblibrecast, -llibrecast)
Name
mtree_build - build a merkle tree from base data
Return Value
mtree_init() returns zero on success. On error, -1 is returned, and errno is set to indicate the error.
The mtree_free() function returns no value, and preserves errno.
See Also
mtree_init(3), mtree_free(3), q_init(3), q_pool_create(3), q_job_seek(3) LIBRECAST 2023-06-20 MTREE_BUILD(3)
Synopsis
#include<librecast/mtree.h>intmtree_build(mtree_t*tree,void*constdata,q_t*q);
Compile and link with -llibrecast.
