X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwimlib.h;h=1de5d045801bb5eeb09300a748c1a8d9e932cc6b;hp=a249b8954a901c55a594534b3fb49156b8e8de12;hb=7bde3fc590afbdef8f71cd7f8ccbd24172bffc63;hpb=b78b15e68de3c3f9a6aed5d3514e86a72cc9c9b1 diff --git a/src/wimlib.h b/src/wimlib.h index a249b895..1de5d045 100644 --- a/src/wimlib.h +++ b/src/wimlib.h @@ -1282,6 +1282,34 @@ extern int wimlib_get_num_images(const WIMStruct *wim); */ extern int wimlib_get_part_number(const WIMStruct *wim, int *total_parts_ret); +/** + * Since wimlib 1.2.6: Initialization function for wimlib. This is not + * re-entrant. If you are calling wimlib functions concurrently in different + * threads, then you must call this function serially first. Otherwise, calling + * this function is not required. + * + * @return 0 on success; nonzero on error. + * @retval ::WIMLIB_ERR_NOMEM + * Could not allocate memory. + * @retval ::WIMLIB_ERR_ICONV_NOT_AVAILABLE + * wimlib was configured --without-libntfs-3g at compilation time, and at + * runtime the iconv() set of functions did not seem to be available, + * perhaps due to missing files in the C library installation. + * + * If this function is not called or returns nonzero, then it will not be safe + * to use wimlib in multiple threads. Furthermore, a nonzero return value here + * indicates that further calls into wimlib will probably fail when they try to + * repeat the same initializations. + */ +extern int wimlib_global_init(); + +/** + * Since wimlib 1.2.6: Cleanup function for wimlib. This is not re-entrant. + * You are not required to call this function, but it will release any global + * memory allocated by the library. + */ +extern void wimlib_global_cleanup(); + /** * Returns true if the WIM has an integrity table. *