• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ queue_task函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中queue_task函数的典型用法代码示例。如果您正苦于以下问题:C++ queue_task函数的具体用法?C++ queue_task怎么用?C++ queue_task使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了queue_task函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: jade_sched_event

void
jade_sched_event(struct BCState *bcs, int event)
{
    bcs->event |= 1 << event;
    queue_task(&bcs->tqueue, &tq_immediate);
    mark_bh(IMMEDIATE_BH);
}
开发者ID:cilynx,项目名称:dd-wrt,代码行数:7,代码来源:jade.c


示例2: amd7930_dxmit_callback

static void
amd7930_dxmit_callback(void *arg, int error)
{
	struct IsdnCardState *cs = (struct IsdnCardState *) arg;
	static struct tq_struct task;

        /* NOTE: This function is called directly from an interrupt handler */

	/* may wish to do retransmission here, if error indicates collision */

	if (cs->debug & L1_DEB_ISAC_FIFO) {
		char tmp[128];
		char *t = tmp;

		t += sprintf(t, "amd7930 Dxmit cnt %d", cs->tx_skb->len);
		if (error) t += sprintf(t, " ERR %x", error);
		QuickHex(t, cs->tx_skb->data, cs->tx_skb->len);
		debugl1(cs, tmp);
	}

	cs->tx_skb = NULL;

	task.routine = (void *) DChannel_proc_xmt;
	task.data = (void *) cs;
	queue_task(&task, &tq_immediate);
	mark_bh(IMMEDIATE_BH);
}
开发者ID:nhanh0,项目名称:hah,代码行数:27,代码来源:amd7930.c


示例3: avmb1_card_ready

void avmb1_card_ready(avmb1_card * card)
{
	__u16 appl;

	card->cversion.majorversion = 2;
	card->cversion.minorversion = 0;
	card->cversion.majormanuversion = (card->version[VER_DRIVER][0] - '0') << 4;
	card->cversion.majormanuversion |= (card->version[VER_DRIVER][2] - '0');
	card->cversion.minormanuversion = (card->version[VER_DRIVER][3] - '0') << 4;
	card->cversion.minormanuversion |= (card->version[VER_DRIVER][5] - '0') * 10;
	card->cversion.minormanuversion |= (card->version[VER_DRIVER][6] - '0');
	card->cardstate = CARD_RUNNING;


	for (appl = 1; appl <= CAPI_MAXAPPL; appl++) {
		if (VALID_APPLID(appl) && !APPL(appl)->releasing) {
			B1_send_register(card->port, appl,
				1024 * (APPL(appl)->rparam.level3cnt+1),
				APPL(appl)->rparam.level3cnt,
				APPL(appl)->rparam.datablkcnt,
				APPL(appl)->rparam.datablklen);
		}
	}

        set_bit(CARDNR(card), &notify_up_set);
        queue_task(&tq_state_notify, &tq_scheduler);
        printk(KERN_NOTICE "b1capi: card %d ready.\n", CARDNR(card));
}
开发者ID:rohsaini,项目名称:mkunity,代码行数:28,代码来源:b1capi.c


示例4: hycapi_sendmsg_internal

static void
hycapi_sendmsg_internal(struct capi_ctr *ctrl, struct sk_buff *skb)
{
	hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
	hysdn_card *card = cinfo->card;

	spin_lock_irq(&cinfo->lock);
#ifdef HYCAPI_PRINTFNAMES
	printk(KERN_NOTICE "hycapi_send_message\n");    
#endif
	cinfo->skbs[cinfo->in_idx++] = skb;	/* add to buffer list */
	if (cinfo->in_idx >= HYSDN_MAX_CAPI_SKB)
		cinfo->in_idx = 0;	/* wrap around */
	cinfo->sk_count++;		/* adjust counter */
	if (cinfo->sk_count >= HYSDN_MAX_CAPI_SKB) {
		/* inform upper layers we're full */
		printk(KERN_ERR "HYSDN Card%d: CAPI-buffer overrun!\n",
		       card->myid);	
		ctrl->suspend_output(ctrl);
	}
	cinfo->tx_skb = skb;
	spin_unlock_irq(&cinfo->lock);
	queue_task(&card->irq_queue, &tq_immediate);
	mark_bh(IMMEDIATE_BH);
}
开发者ID:SimonKagstrom,项目名称:mci500h-linux-2.4.27,代码行数:25,代码来源:hycapi.c


示例5: rb_mtp_thread_delete_track

void
rb_mtp_thread_delete_track (RBMtpThread *thread, LIBMTP_track_t *track)
{
	RBMtpThreadTask *task = create_task (DELETE_TRACK);
	task->track_id = track->item_id;
	task->storage_id = track->storage_id;
	queue_task (thread, task);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:8,代码来源:rb-mtp-thread.c


示例6: rb_mtp_thread_set_album_image

void
rb_mtp_thread_set_album_image (RBMtpThread *thread, const char *album, GdkPixbuf *image)
{
	RBMtpThreadTask *task = create_task (SET_ALBUM_IMAGE);
	task->album = g_strdup (album);
	task->image = g_object_ref (image);
	queue_task (thread, task);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:8,代码来源:rb-mtp-thread.c


示例7: schedule_task

/**
 * schedule_task - schedule a function for subsequent execution in process context.
 * @task: pointer to a &tq_struct which defines the function to be scheduled.
 *
 * May be called from interrupt context.  The scheduled function is run at some
 * time in the near future by the keventd kernel thread.  If it can sleep, it
 * should be designed to do so for the minimum possible time, as it will be
 * stalling all other scheduled tasks.
 *
 * schedule_task() returns non-zero if the task was successfully scheduled.
 * If @task is already residing on a task queue then schedule_task() fails
 * to schedule your task and returns zero.
 */
int schedule_task(struct tq_struct *task)
{
	int ret;
	need_keventd(__FUNCTION__);
	ret = queue_task(task, &tq_context);
	wake_up(&context_task_wq);
	return ret;
}
开发者ID:FoXPeeD,项目名称:OS-bwis,代码行数:21,代码来源:context.c


示例8: ctc_tty_transmit_status

static void
ctc_tty_transmit_status(ctc_tty_info *info)
{
	if (ctc_tty_shuttingdown)
		return;
	info->flags |= CTC_ASYNC_TX_LINESTAT;
	queue_task(&info->tq, &tq_immediate);
	mark_bh(IMMEDIATE_BH);
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:9,代码来源:ctctty.c


示例9: plser_start_tx

static void plser_start_tx(struct uart_port *port, u_int nonempty, u_int from_tty)
{

    if (nonempty) {
        port->read_status_mask |= ST_TX_FULL | ST_CTS;
        queue_task(&plser_task, &tq_immediate);
        mark_bh(IMMEDIATE_BH);
    }
}
开发者ID:archith,项目名称:camera_project,代码行数:9,代码来源:pl_ser.c


示例10: rb_mtp_thread_remove_from_album

void
rb_mtp_thread_remove_from_album (RBMtpThread *thread, LIBMTP_track_t *track, const char *album)
{
	RBMtpThreadTask *task = create_task (REMOVE_FROM_ALBUM);
	task->track_id = track->item_id;
	task->storage_id = track->storage_id;
	task->album = g_strdup (album);
	queue_task (thread, task);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:9,代码来源:rb-mtp-thread.c


示例11: rb_mtp_thread_add_to_album

void
rb_mtp_thread_add_to_album (RBMtpThread *thread, LIBMTP_track_t *track, const char *album)
{
	RBMtpThreadTask *task = create_task (ADD_TO_ALBUM);
	task->track_id = track->item_id;
	task->storage_id = track->storage_id;
	task->album = g_strdup (album);
	queue_task (thread, task);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:9,代码来源:rb-mtp-thread.c


示例12: tpam_enqueue

/*
 * Queue a message to be send to the card when possible.
 *
 * 	card: the board
 * 	skb: the sk_buff containing the message.
 */
void tpam_enqueue(tpam_card *card, struct sk_buff *skb) {

	dprintk("TurboPAM(tpam_enqueue): card=%d\n", card->id);

	/* queue the sk_buff on the board's send queue */
	skb_queue_tail(&card->sendq, skb);

	/* queue the board's send task struct for immediate treatment */
	queue_task(&card->send_tq, &tq_immediate);
	mark_bh(IMMEDIATE_BH);
}
开发者ID:froggatt,项目名称:edimax-br-6528n,代码行数:17,代码来源:tpam_queues.c


示例13: rb_mtp_thread_queue_callback

void
rb_mtp_thread_queue_callback (RBMtpThread *thread,
			      RBMtpThreadCallback func,
			      gpointer data,
			      GDestroyNotify destroy_data)
{
	RBMtpThreadTask *task = create_task (THREAD_CALLBACK);
	task->callback = func;
	task->user_data = data;
	task->destroy_data = destroy_data;
	queue_task (thread, task);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:12,代码来源:rb-mtp-thread.c


示例14: ctc_tty_write

/* ctc_tty_write() is the main send-routine. It is called from the upper
 * levels within the kernel to perform sending data. Depending on the
 * online-flag it either directs output to the at-command-interpreter or
 * to the lower level. Additional tasks done here:
 *  - If online, check for escape-sequence (+++)
 *  - If sending audio-data, call ctc_tty_DLEdown() to parse DLE-codes.
 *  - If receiving audio-data, call ctc_tty_end_vrx() to abort if needed.
 *  - If dialing, abort dial.
 */
static int
ctc_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int count)
{
	int c;
	int total = 0;
	ctc_tty_info *info = (ctc_tty_info *) tty->driver_data;

	if (ctc_tty_shuttingdown)
		return 0;
	if (ctc_tty_paranoia_check(info, tty->device, "ctc_tty_write"))
		return 0;
	if (!tty)
		return 0;
	if (!info->netdev)
		return -ENODEV;
	if (from_user)
		down(&info->write_sem);
	while (1) {
		struct sk_buff *skb;
		int skb_res;

		c = (count < CTC_TTY_XMIT_SIZE) ? count : CTC_TTY_XMIT_SIZE;
		if (c <= 0)
			break;
		
		skb_res = info->netdev->hard_header_len + sizeof(info->mcr) +
			+ sizeof(__u32);
		skb = dev_alloc_skb(skb_res + c);
		if (!skb) {
			printk(KERN_WARNING
			       "ctc_tty: Out of memory in %s%d write\n",
			       CTC_TTY_NAME, info->line);
			break;
		}
		skb_reserve(skb, skb_res);
		if (from_user)
			copy_from_user(skb_put(skb, c), buf, c);
		else
			memcpy(skb_put(skb, c), buf, c);
		skb_queue_tail(&info->tx_queue, skb);
		buf += c;
		total += c;
		count -= c;
	}
	if (skb_queue_len(&info->tx_queue)) {
		info->lsr &= ~UART_LSR_TEMT;
		queue_task(&info->tq, &tq_immediate);
		mark_bh(IMMEDIATE_BH);
	}
	if (from_user)
		up(&info->write_sem);
	return total;
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:62,代码来源:ctctty.c


示例15: jiq_print_tq

/*
 * Call jiq_print from a task queue
 */
void jiq_print_tq(void *ptr)
{
    if (jiq_print (ptr)) {
        struct clientdata *data = (struct clientdata *)ptr;
        if (data->queue == SCHEDULER_QUEUE)
	    schedule_task(&jiq_task);
        else if (data->queue)
            queue_task(&jiq_task, data->queue);
        if (data->queue == &tq_immediate)
            mark_bh(IMMEDIATE_BH); /* this one needs to be marked */
    }
}
开发者ID:crond,项目名称:dd,代码行数:15,代码来源:jiq.c


示例16: raw3215_sched_bh

/*
 * Function to safely add raw3215_softint to tq_immediate.
 * The s390irq spinlock must be held.
 */
static inline void raw3215_sched_bh(raw3215_info *raw)
{
        if (raw->flags & RAW3215_BH_PENDING)
                return;       /* already pending */
        raw->flags |= RAW3215_BH_PENDING;
	INIT_LIST_HEAD(&raw->tqueue.list);
	raw->tqueue.sync = 0;
        raw->tqueue.routine = raw3215_softint;
        raw->tqueue.data = raw;
        queue_task(&raw->tqueue, &tq_immediate);
        mark_bh(IMMEDIATE_BH);
}
开发者ID:SimonKagstrom,项目名称:mci500h-linux-2.4.27,代码行数:16,代码来源:con3215.c


示例17: rb_mtp_thread_get_track_list

void
rb_mtp_thread_get_track_list (RBMtpThread *thread,
			      RBMtpTrackListCallback callback,
			      gpointer data,
			      GDestroyNotify destroy_data)
{
	RBMtpThreadTask *task = create_task (GET_TRACK_LIST);
	task->callback = callback;
	task->user_data = data;
	task->destroy_data = destroy_data;
	queue_task (thread, task);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:12,代码来源:rb-mtp-thread.c


示例18: acm_write_bulk

static void acm_write_bulk(struct urb *urb)
{
	struct acm *acm = (struct acm *)urb->context;

	if (!ACM_READY(acm)) return;

	if (urb->status)
		dbg("nonzero write bulk status received: %d", urb->status);

	queue_task(&acm->tqueue, &tq_immediate);
	mark_bh(IMMEDIATE_BH);
}
开发者ID:dmgerman,项目名称:original,代码行数:12,代码来源:acm.c


示例19: on_timer_2

static void on_timer_2(void *arg)
{
   struct r3964_info *pInfo = (struct r3964_info *)arg;
  
   if(pInfo->count_down)
   {
      if(!--pInfo->count_down)
      {
         on_timeout(pInfo);
      }
   }
   queue_task(&pInfo->bh_1, &tq_timer);
}
开发者ID:archith,项目名称:camera_project,代码行数:13,代码来源:n_r3964.c


示例20: tpam_enqueue_data

/*
 * Queue a data message to be send to the card when possible.
 *
 * 	card: the board
 * 	skb: the sk_buff containing the message and the data. This parameter
 * 		can be NULL if we want just to trigger the send of queued 
 * 		messages.
 */
void tpam_enqueue_data(tpam_channel *channel, struct sk_buff *skb) {
	
	dprintk("TurboPAM(tpam_enqueue_data): card=%d, channel=%d\n", 
		channel->card->id, channel->num);

	/* if existant, queue the sk_buff on the channel's send queue */
	if (skb)
		skb_queue_tail(&channel->sendq, skb);

	/* queue the channel's send task struct for immediate treatment */
	queue_task(&channel->card->send_tq, &tq_immediate);
	mark_bh(IMMEDIATE_BH);
}
开发者ID:froggatt,项目名称:edimax-br-6528n,代码行数:21,代码来源:tpam_queues.c



注:本文中的queue_task函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ queue_var_show函数代码示例发布时间:2022-05-30
下一篇:
C++ queue_size函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap