Beispiel #1
0
void xc_report_progress_step(xc_interface *xch,
                             unsigned long done, unsigned long total)
{
    assert(xch->currently_progress_reporting);
    xtl_progress(xch->error_handler, "xc",
                 xch->currently_progress_reporting, done, total);
}
Beispiel #2
0
void libxl__srm_callout_callback_progress(const char *context,
                   const char *doing_what, unsigned long done,
                   unsigned long total, void *user)
{
    libxl__save_helper_state *shs = user;
    STATE_AO_GC(shs->ao);
    xtl_progress(CTX->lg, context, doing_what, done, total);
}
/* external test: handle -> unit = "stub_xtl_test" */
CAMLprim value stub_xtl_test(value handle)
{
	unsigned long l;
	CAMLparam1(handle);
	xtl_log(XTL, XTL_DEBUG, -1, "debug", "%s -- debug", __func__);
	xtl_log(XTL, XTL_INFO, -1, "test", "%s -- test 1", __func__);
	xtl_log(XTL, XTL_INFO, ENOSYS, "test errno", "%s -- test 2", __func__);
	xtl_log(XTL, XTL_CRITICAL, -1, "critical", "%s -- critical", __func__);
	for (l = 0UL; l<=100UL; l += 10UL) {
		xtl_progress(XTL, "progress", "testing", l, 100UL);
		usleep(10000);
	}
	CAMLreturn(Val_unit);
}
Beispiel #4
0
void xc_report_progress_single(xc_interface *xch, const char *doing)
{
    assert(doing);
    xtl_progress(xch->error_handler, "xc", doing, 0, 0);
}
Beispiel #5
0
void xc_report_progress_start(xc_interface *xch, const char *doing,
                              unsigned long total) {
    xch->currently_progress_reporting = doing;
    xtl_progress(xch->error_handler, "xc", xch->currently_progress_reporting,
                 0, total);
}