Date: Fri, 29 Jan 1999 20:10:29 -0500 (EST) From: zhihuizhang <bf20761@binghamton.edu> To: hackers <freebsd-hackers@FreeBSD.ORG> Subject: interrupt unit number or clockframe? Message-ID: <Pine.SOL.L3.93.990129195419.9907A-100000@bingsun1>
next in thread | raw e-mail | index | archive | help
In the assembly interrupt interface stub (see vector.s), the unit number of an interrupt is pushed onto the stack before the stub calls the corresponding interrupt handler written in C: pushl _intr_unit + (irq_num) * 4 ... call * _intr_handler + (irq_num) * 4 So a C interrupt handler should expect a unit number as its argument. But why we have the following statement in clock.c where we expect an address of a clockframe? static void clkintr(struct clockframe frame); What is more, the above interrupt handler is registered with the following statement: register_intr(0,0,0,(inthand2_t)clkintr,&clk_imask,0); The unit number given is zero. So the frame's address will be zero and yet we use it in the clkintr() anyway (see hardclock() called by it). I hope someone can help me out. Thanks a lot. -------------------------------------------------- | Zhihui Zhang, http://cs.binghamton.edu/~zzhang | | Dept. of Computer Science, SUNY at Binghamton | -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.990129195419.9907A-100000>