Chinaunix首页 | 论坛 | 博客
  • 博客访问: 204526
  • 博文数量: 51
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 426
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-24 08:05
文章分类

全部博文(51)

文章存档

2015年(3)

2013年(1)

2011年(4)

2010年(8)

2008年(2)

2007年(18)

2006年(15)

我的朋友

分类: 系统运维

2007-06-08 18:21:23

描述:op_pk_priority_set (pkptr, value)
功能:设置包的优先级;
返回值:void
说明:
     pkptr:指向要设置的包的指针;
     value:用户想设置的值。高数值意味着高优先级。
     注:包的优先权可以在任何时候修改和获得。
举例:
/* acquire the arriving packet */
/* multiple arriving streams are supported. */
pkptr = op_pk_get (op_intrpt_strm ());
/* new packets are stamped to */
/* indicate the packet is waiting for service. */
op_pk_priority_set (pkptr, PK_STATUS_WAITING);
/* attempt to enqueue the packet at tail of subqueue 0 */
if (op_subq_pk_insert (0, pkptr, OPC_QPOS_TAIL) != OPC_QINS_OK)
{
/* the insertion failed (due to a full queue)... */
op_pk_destroy (pkptr);
/* set flag indicating insertion failed... */
insert_ok = 0;
}
阅读(1771) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~