op_trace_resume()
摘要
重新激活此前用 op_trace_suspend() 暂停的跟踪。
语法
op_trace_resume ()
| 参数 | 类型 | 说明 |
|---|---|---|
| 无参数 |
返回类型
void
无返回值。
示例
/* allocate a list */
list_ptr = (List *) op_prg_mem_alloc (sizeof (List));
/* initialize a list */
op_prg_list_init (list_ptr);
/** move the contents of subqueue #0 into the list **/
/* determine the number of packets in the subqueue */
subq_size = op_subq_stat (0, OPC_QSTAT_PKSIZE);
/* don't bother tracing the inserts */
op_trace_suspend();
for (i = 0; i < subq_size; i++)
{
/* take a single packet from the subqueue head */
pkptr = op_subq_pk_remove (0, OPC_QPOS_HEAD);
/* insert the packet onto the list tail */
op_prg_list_insert (list_ptr, pkptr, OPC_LISTPOS_TAIL);
}
/* reactivate tracing */
op_trace_resume();
详情
当 ODB 未启用时,该内核过程不起任何作用。
每一次 op_trace_suspend() 调用都必须有一次与之配对的 op_trace_resume() 调用,跟踪才会重新激活。如果在第一次 op_trace_resume() 之前发生了多次 op_trace_suspend() 调用,则只有当 op_trace_resume() 的调用次数与之相等时,跟踪才会恢复。例如:
op_trace_suspend();
...
op_trace_suspend();
...
op_trace_resume(); // Still suspended
...
op_trace_resume(); // Tracing resumed (both suspends have been matched)
被 ODB “susptrace“ 命令暂停的跟踪不会被 op_trace_resume() 重新激活。这些跟踪将保持暂停状态,直到 “acttrace“ 命令将其重新激活。
用途
提供了一种在通过 op_trace_suspend() 临时暂停跟踪之后、在 ODB 中恢复跟踪的方法。
错误
- 无。
参考
- 无。