我想在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)