相关疑难解决方法(0)

如何在linux内核中定义和触发我自己的新softirq?

我想在linux内核中创建自己的softirq.这是正确的方法:

init模块中我想触发softirqfrom我将添加一个调用:

394 void open_softirq(int nr, void (*action)(struct softirq_action *))
395 {
396         softirq_vec[nr].action = action;
397 }
Run Code Online (Sandbox Code Playgroud)

在片段中我想提高softirq我将添加一个raise_softirq函数调用:

379 void raise_softirq(unsigned int nr)
380 {
381         unsigned long flags;
382 
383         local_irq_save(flags);
384         raise_softirq_irqoff(nr);
385         local_irq_restore(flags);
386 }
Run Code Online (Sandbox Code Playgroud)

并添加我的新内容softirq:

411 /* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
412    frequency threaded job scheduling. For almost all the purposes
413    tasklets are more than enough. F.e. all …
Run Code Online (Sandbox Code Playgroud)

c android arm linux-kernel softirq

7
推荐指数
1
解决办法
1695
查看次数

标签 统计

android ×1

arm ×1

c ×1

linux-kernel ×1

softirq ×1