Wie definiere und starte ich meine eigene neue Software im Linux-Kernel?

Ich möchte meine eigene Software im Linux-Kernel erstellen. Ist es der richtige Weg, das zu tun:

In deminit des moduls möchte ich das auslösensoftirq von Ich rufe an:

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

Und im Snippet möchte ich den Softirq erhöhen, zu dem ich einen Anruf hinzufügen werderaise_softirq Funktion:

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 }

Und füge mein neues hinzusoftirq im:

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 serial device BHs et
414    al. should be converted to tasklets, not to softirqs.
415  */
416 
417 enum
418 {
419         HI_SOFTIRQ=0,
420         TIMER_SOFTIRQ,
421         NET_TX_SOFTIRQ,
422         NET_RX_SOFTIRQ,
423         BLOCK_SOFTIRQ,
424         BLOCK_IOPOLL_SOFTIRQ,
425         TASKLET_SOFTIRQ,
426         SCHED_SOFTIRQ,
427         HRTIMER_SOFTIRQ,
428         RCU_SOFTIRQ,    /* Preferable RCU should always be the last softirq */
429         MY_NEW_SOFTIRQ
430         NR_SOFTIRQS
431 };

Und hier drin:

 60 char *softirq_to_name[NR_SOFTIRQS] = {
 61         "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL",
 62         "TASKLET", "SCHED", "HRTIMER", "RCU", "MY_NEW_SOFTIRQ"
 63 };
Die Fragen:Habe ich recht oder habe ich etwas verpasst?Ist das der richtige Weg? andere Möglichkeiten?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage