Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
irq.c:26:58: warning: 'struct regs' declared inside parameter list
void irq_install_handler(int irq, void (*handler)(struct regs *r))
^
irq.c:26:58: warning: its scope is only this definition or declaration, which is probably not what you want
irq.c:74:25: warning: 'struct regs' declared inside parameter list
void irq_handler(struct regs *r)
^
irq.c: In function 'irq_handler':
irq.c:81:29: error: dereferencing pointer to incomplete type
handler = irq_routines[r->int_no - 32];
^
irq.c:90:10: error: dereferencing pointer to incomplete type
if (r->int_no >= 40)
^
wiki wrote:Not only should you know the language in which you will be developing inside out (...)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
irq.c:26:58: warning: 'struct regs' declared inside parameter list
void irq_install_handler(int irq, void (*handler)(struct regs *r))
^
irq.c:26:58: warning: its scope is only this definition or declaration, which is probably not what you want
irq.c:74:25: warning: 'struct regs' declared inside parameter list
void irq_handler(struct regs *r)
^
irq.c: In function 'irq_handler':
irq.c:81:29: error: dereferencing pointer to incomplete type
handler = irq_routines[r->int_no - 32];
^
irq.c:90:10: error: dereferencing pointer to incomplete type
if (r->int_no >= 40)
^
You don't have struct regs declared anywhere. Did you forget to declare it? Did you delete the declaration? Did you not #include a file that declares it? Was there a typo in the declaration, e.g. struct Regs or struct reg or struct reggs, etc?
Come on, the error issued by the compiler is pretty clear. Unless, of course, you're a complete C newbie.