Skip to content

Commit

Permalink
Merge pull request #295 from Gottox/fix/missing-headers
Browse files Browse the repository at this point in the history
posix: add missing file headers.
  • Loading branch information
Gottox committed Aug 19, 2024
1 parent aec827c commit 5711b8a
Showing 1 changed file with 23 additions and 0 deletions.
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

0 comments on commit 5711b8a

Please sign in to comment.