本文整理汇总了C++中JCR::is_killable方法的典型用法代码示例。如果您正苦于以下问题:C++ JCR::is_killable方法的具体用法?C++ JCR::is_killable怎么用?C++ JCR::is_killable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JCR
的用法示例。
在下文中一共展示了JCR::is_killable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dbg_print_jcr
/*
* !!! WARNING !!!
*
* This function should be used ONLY after a fatal signal. We walk through the
* JCR chain without doing any lock, BAREOS should not be running.
*/
void dbg_print_jcr(FILE *fp)
{
char buf1[128], buf2[128], buf3[128], buf4[128];
if (!jcrs) {
return;
}
fprintf(fp, "Attempt to dump current JCRs. njcrs=%d\n", jcrs->size());
for (JCR *jcr = (JCR *)jcrs->first(); jcr ; jcr = (JCR *)jcrs->next(jcr)) {
#ifdef HAVE_WIN32
fprintf(fp, "threadid=%p JobId=%d JobStatus=%c jcr=%p name=%s\n",
(void *)&jcr->my_thread_id, (int)jcr->JobId,
jcr->JobStatus, jcr, jcr->Job);
fprintf(fp, "threadid=%p killable=%d JobId=%d JobStatus=%c "
"jcr=%p name=%s\n",
(void *)&jcr->my_thread_id, jcr->is_killable(),
(int)jcr->JobId, jcr->JobStatus, jcr, jcr->Job);
#else
fprintf(fp, "threadid=%p JobId=%d JobStatus=%c jcr=%p name=%s\n",
(void *)jcr->my_thread_id, (int)jcr->JobId,
jcr->JobStatus, jcr, jcr->Job);
fprintf(fp, "threadid=%p killable=%d JobId=%d JobStatus=%c "
"jcr=%p name=%s\n",
(void *)jcr->my_thread_id, jcr->is_killable(),
(int)jcr->JobId, jcr->JobStatus, jcr, jcr->Job);
#endif
fprintf(fp, "\tuse_count=%i\n", jcr->use_count());
fprintf(fp, "\tJobType=%c JobLevel=%c\n",
jcr->getJobType(), jcr->getJobLevel());
bstrftime(buf1, sizeof(buf1), jcr->sched_time);
bstrftime(buf2, sizeof(buf2), jcr->start_time);
bstrftime(buf3, sizeof(buf3), jcr->end_time);
bstrftime(buf4, sizeof(buf4), jcr->wait_time);
fprintf(fp, "\tsched_time=%s start_time=%s\n\tend_time=%s wait_time=%s\n",
buf1, buf2, buf3, buf4);
fprintf(fp, "\tdb=%p db_batch=%p batch_started=%i\n",
jcr->db, jcr->db_batch, jcr->batch_started);
/*
* Call all the jcr debug hooks
*/
for(int i=0; i < dbg_jcr_handler_count; i++) {
dbg_jcr_hook_t *hook = dbg_jcr_hooks[i];
hook(jcr, fp);
}
}
}