本文整理汇总了C++中rr_dev::more_cb方法的典型用法代码示例。如果您正苦于以下问题:C++ rr_dev::more_cb方法的具体用法?C++ rr_dev::more_cb怎么用?C++ rr_dev::more_cb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rr_dev
的用法示例。
在下文中一共展示了rr_dev::more_cb方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
rr_dev_set_paused (rr_dev dev, int priority, int paused)
{
dev->paused[priority] = paused;
/* re-start client's writing */
if (!paused) {
dev->more_cb (dev, dev->more_cl);
dev->wait_wr_cb (dev, 1, dev->wait_wr_cl);
}
}
示例2: queue
void
rr_dev_handle_ok (rr_dev dev)
{
int buffered = rr_dev_buffered_lines (dev);
/* Send as many commands as we get ok's */
if (dev->init_send_count > 0)
dev->init_send_count--;
dev->send_next = 1;
if (buffered < dev->dev_cmdqueue_size) {
rr_dev_log (dev, RR_DEBUG_MEDIUM,
"request more %d < %d\n", buffered, dev->dev_cmdqueue_size);
dev->more_cb (dev, dev->more_cl);
}
dev->wait_wr_cb (dev, 1, dev->wait_wr_cl);
if (dev->debug_output > RR_DEBUG_ALWAYS)
{ /* Check the sendsize accounts add up */
int i = 0;
for (i = 0; i < RR_PRIO_COUNT; ++i) {
blocknode *p;
int count = 0;
for (p = dev->sendhead[i]; p; p = p->next) {
if (!p->next && dev->sendtail[i] != p)
rr_dev_log (dev, RR_DEBUG_MEDIUM,
"Error: queue (%d) broken tail pointer %p vs %p\n",
i, p, dev->sendtail[i]);
count++;
}
if (count != dev->sendsize[i])
rr_dev_log (dev, RR_DEBUG_MEDIUM,
"Error: queue (%d) size mismatch: %d vs %d\n",
i, count, dev->sendsize[i]);
}
}
}