Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

posix: add missing file headers. #295

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions include/sqsh_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,29 @@ SQSH_NO_UNUSED int sqsh_file_to_stream_mt(
const struct SqshFile *file, struct SqshThreadpool *threadpool,
FILE *stream, sqsh_file_to_stream_mt_cb cb, void *data);

/**
* @memberof SqshFile
* @brief creates a file descriptor from a file and calls a callback for each
* block.
*
* @param[in] file The file context.
* @param[in] threadpool The threadpool to use.
* @param[in] cb The callback to call for each block.
* @param[in] data The data to pass to the callback.
*/
void sqsh_file_iterator_mt(
const struct SqshFile *file, struct SqshThreadpool *threadpool,
sqsh_file_iterator_mt_cb cb, void *data);

/**
* @memberof SqshThreadpool
* @brief creates a new threadpool.
*
* @param[in] threads The number of threads to use. Use 0 to use the number of
* available cores.
* @param[out] err The error code.
* @return The threadpool on success, NULL on error.
*/
struct SqshThreadpool *sqsh_threadpool_new(size_t threads, int *err);

int sqsh_threadpool_wait(struct SqshThreadpool *pool);
Expand Down
Loading