kern

diff src/intr.h @ 47:f65b348780e3

continuing with the process implementation. not done yet, panics.
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 28 Jul 2011 05:43:04 +0300
parents 06172322fb76
children 50730d42d2d3
line diff
     1.1 --- a/src/intr.h	Thu Jul 28 05:33:59 2011 +0300
     1.2 +++ b/src/intr.h	Thu Jul 28 05:43:04 2011 +0300
     1.3 @@ -12,6 +12,21 @@
     1.4  /* checks whether a particular interrupt is an remapped IRQ */
     1.5  #define IS_IRQ(n)	((n) >= IRQ_OFFSET && (n) < IRQ_OFFSET + 16)
     1.6  
     1.7 +/* structure used to pass the interrupt stack frame from the
     1.8 + * entry points to the C dispatch function.
     1.9 + */
    1.10 +struct intr_frame {
    1.11 +	/* registers pushed by pusha in intr_entry_* */
    1.12 +	struct registers regs;
    1.13 +	/* interrupt number and error code pushed in intr_entry_* */
    1.14 +	uint32_t inum, err;
    1.15 +	/* pushed by CPU during interrupt entry */
    1.16 +	uint32_t eip, cs, eflags;
    1.17 +	/* pushed by CPU during interrupt entry from user space */
    1.18 +	uint32_t esp, ss;
    1.19 +};
    1.20 +
    1.21 +
    1.22  
    1.23  typedef void (*intr_func_t)(int, uint32_t);
    1.24  
    1.25 @@ -24,4 +39,6 @@
    1.26  int get_intr_state(void);
    1.27  void set_intr_state(int s);
    1.28  
    1.29 +void intr_ret(struct intr_frame ifrm);
    1.30 +
    1.31  #endif	/* INTR_H_ */